ODE45 to solve for velocity & plot velocities v frequencies?
4 ビュー (過去 30 日間)
古いコメントを表示
FREQ = 0:1000;
m1 = 12; m2 = 24;
K1 = 6000; K2 = 3450;
R1 = 40; R2 = 28;
P = 1 * (1i * 2 * pi * FREQ);
My state variable equations are:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222241/image.jpeg)
I want to use ODE45 to solve the system of equations.
& plot the velocity x(dot)1 {should result in 1000 values for x(dot)1} vs FREQ.
How can I do this?
0 件のコメント
回答 (1 件)
Steven Lord
2019 年 5 月 31 日
See the "Systems of ODEs" section on this documentation page for how to write your ODE function. Then use that in a call to ode45. You should be able to adapt the "Solve Nonstiff Equation" example on the documentation page for ode45 (which you can open using the command doc ode45) for your problem.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!