Plot a second order equation and plot two equations on the same grafic
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Igor
el 8 de Feb. de 2012
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 comentarios
Respuesta aceptada
Kevin Holst
el 8 de Feb. de 2012
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!