How to convert odetovectorfield results to A,B matrices?

1 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by