How can i solve initial value ordinary differential equation using matlab ??
显示 更早的评论
I want to solve four differtial equation and these are shown in picture. Here u,s,p,r are dependent variable and t is the independent variable. W and a are the constant (values are 154 and 44.5 degree). t is the independent variable and varies from 0 to 180 degree. initial condition are u0 = 0.10, so = 0.2025, p0 = 1.4706, r0 = 2.2449.
5 个评论
Florian Bidaud
2023-8-21
What have you tried so far ?
Surendra Ratnu
2023-8-21
It seems to me that u and s are vectors, since
here implies computing their cross-products. What are they exactly?
That aside, to use the equations as you wrote them and then get executable code that can be used with the MATLAB ODE integrators, first use odeToVectorField and then matlabFunction on the vector field result. (Return both results so that you know what substitutions were made.)
Use the symmatrix function to create u and s, since the intent is apparently to create their cross-products. That then causes a problem, because while taking the derivative of the cross product is not a problem (regardless of their being either row or column vectors), equating the resulting vector to the RHS scalar is a problem.
imshow(imread('Picture2.jpg'))
syms a t
u = symmatrix('u(t)',[3 1])
s = symmatrix('s(t)',[1 3])
LHS1 = diff(cross(u,s))
RHS1 = sin(a)^3/(4*(1+cos(a)*cos(t))^2)
Eq1 = LHS1 == RHS1
This needs to be clarified.
What do you want to do?
.
Surendra Ratnu
2023-8-21
Bruno Luong
2023-8-21
Some obvious mixe and match unit : sin and cos take argument in radian not in degree
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

