Use of functions ctrb and poly

3 Ansichten (letzte 30 Tage)
Ken
Ken am 18 Feb. 2025
Kommentiert: Ken am 18 Feb. 2025
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?

Akzeptierte Antwort

Sam Chak
Sam Chak am 18 Feb. 2025
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 Kommentar
Ken
Ken am 18 Feb. 2025
Thanks - my B matrix was 2X2, SHOULD BE 2X1 like yours

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by