2DOF question and other things...help me...
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
2 commentaires
Ameer Hamza
le 16 Avr 2020
This is a homework question. Show us what you have already tried. Also read this: https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Réponses (1)
Ameer Hamza
le 19 Avr 2020
Since you haven't posted the equation in mathematical form, so I can only guess. The following code will not give any error, but I am not sure if it is what you want?
t=0:0.1:20;
X0=[0,0];
[t,X]=ode45(@HW5,t,X0);
function Homework5 =HW5(t, X)
m=10;
c=1000;
k=100000;
e=0.001;
w=100;
R=0.5;
F1=m*e*w^2*cos(w*t);
Homework5=[X(2); -c/m*X(2)-k/m*X(1)+F1/m];
end
4 commentaires
Ameer Hamza
le 19 Avr 2020
Considering the ODEs you wrote, the function appears to be correct. However, the ODEs seems to be independent of each other? One would expect that for such a system, the system of ODEs should be coupled.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!