필터 지우기
필터 지우기

How to convert odetovectorfield results to A,B matrices?

조회 수: 1 (최근 30일)
jokn buntue
jokn buntue 2019년 12월 12일
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