Use of functions ctrb and poly

3 次查看(过去 30 天)
I have 2 matrices A, B. I use ctrb(A,B) to get matrix P and then try to use poly(P) to get the polynomial of P but get error msg saying it requires a vector or square matrix. Any suggestions?

采纳的回答

Sam Chak
Sam Chak 2025-2-18
No error message generated. You should provide yours to find out the actual issue.
A = [ 0 1;
-1 -2];
B = [ 0;
1];
P = ctrb(A, B)
P = 2×2
0 1 1 -2
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
cp = poly(P)
cp = 1×3
1.0000 2.0000 -1.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by