Borrar filtros
Borrar filtros

How to convert odetovectorfield results to A,B matrices?

1 visualización (últimos 30 días)
jokn buntue
jokn buntue el 12 de Dic. de 2019
Hi.
I would like to know how to convert odetovectorfield results to A,B matrices in a state space model.
The following is the code and the results of that code.
syms y(t) u(t) t;
Dy = diff(y);
D2y = diff(y,2);
D3y = diff(y,3);
DEq = D3y + 6*D2y + 11*Dy + 6*y == 6*u;
[SS,Sbs] = odeToVectorField(DEq)
SS =
Y[2]
Y[3]
6*u(t) - 6*Y[1] - 11*Y[2] - 6*Y[3]
Sbs =
y
Dy
D2y
The A matrix is supposed to be [0 1 0; 0 0 1; -6 -11 -6] and the B matrix is supposed to be B= [0; 0; 6] by the way. Can the matlabFunction of symbolic math toolbox help?
Thanks.

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox 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!

Translated by