Use of functions ctrb and poly

3 visualizaciones (últimos 30 días)
Ken
Ken el 18 de Feb. de 2025
Comentada: Ken el 18 de Feb. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by