Use of functions ctrb and poly

2 ビュー (過去 30 日間)
Ken
Ken 2025 年 2 月 18 日
コメント済み: Ken 2025 年 2 月 18 日
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>
  1 件のコメント
Ken
Ken 2025 年 2 月 18 日
Thanks - my B matrix was 2X2, SHOULD BE 2X1 like yours

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by