How solve a ODE with ODE45
Afficher commentaires plus anciens
First I did my m.file
% creating the m file to solve the EDO
function wdot= EOM(t,o)
%%%%%o= omega
j1=6000; j2=3000; j3=3000;
y=40; z=40; alfa=0
area=40*40;
f=1.8*(100)*((cos(2*alfa)+1)/2)*area;
f1=1.8*(100)*((cos(2*alfa)+1)/2)*(area/2);
ycp=-f1*z/f; zcp=-f1*y/f;
t1=0 t2=f*ycp; t3=f*zcp;_
o=[w1;w2;w3]; MY VECTOR OMEGA
wdot=[((t1+(j2-j3)*w2*w3)/j1);((t2+(j3-j1)*w3*w1)/j2);((t3+(j1-j2)*w1*w2)/j3)]; end
WHEN I CALL MY ODE45, it keeps asking for w1 w2 w3, AND i wanted that the ODE45 solve this for me
[t,o]=ode45(@EOM,[0 100],[0,0,0]);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!