Plot a second order equation and plot two equations on the same grafic
2 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone,
1. I can't plot this function in a grafic, I think the code in the editor is not right. The second order equation is:
(a) dx^2/dt^2 (t) = -xg0*w0^2*sin(wf*t)-w0^2*x-2*M*w0*beta*dx/dt
xg0, w0, M, beta are constants.
2. Plot two solutions in the same grafic.
I already solve other system with ode45, now i want to plot that second order equation with one solution of this sistem.
It is a enginneering problem that consist in a structure with and without a vibration control system. One equation (a) give me the response without that control and the system of equations give me the response with that control... I need to compare that in the same grafic.
Thank's everyone.
0 件のコメント
採用された回答
Kevin Holst
2012 年 2 月 8 日
You can plot multiple sets of data on one figure multiple ways. The first way would be:
plot(x1,y1,x2,y2,...)
The next most common would involve using hold:
plot(x1,y1)
hold on
plot(x2,y2)
11 件のコメント
その他の回答 (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!