potting the integral of a state
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone
I would like to enquire about integralting a state.Afer solving a state space equation on matlab sing ode45, how does one go about plotting the integral of a state, please kindly assist, thank you in advance!
0 comentarios
Respuestas (1)
Torsten
el 19 de Mayo de 2021
If y'(t)=f(t,y) is the state space equation, you get the integral of y by simultaneously solving z'(t)=y(t), z(0)=0.
2 comentarios
Paul
el 19 de Mayo de 2021
Editada: Paul
el 20 de Mayo de 2021
Change the last line of sys to:
di = [Ai + Bv; i];
Change iniCon to:
iniCon = [0;0;0;0;zeros(4,1)]; % assuming you want the integrals of y(i) to start from zero
Then y will have 8 states, the first 4 are i and the second 4 are the integrals of i
Ver también
Categorías
Más información sobre Plot Customization 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!