How can i solve initial value ordinary differential equation using matlab ??
Show older comments
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 Comments
Florian Bidaud
on 21 Aug 2023
What have you tried so far ?
Surendra Ratnu
on 21 Aug 2023
Star Strider
on 21 Aug 2023
Edited: Star Strider
on 21 Aug 2023
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
on 21 Aug 2023
Bruno Luong
on 21 Aug 2023
Some obvious mixe and match unit : sin and cos take argument in radian not in degree
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
