error in the output of "ss2tf"

조회 수: 6 (최근 30일)
AVJ
AVJ 2012년 7월 6일
Hi,
I use the following command;
[Hgn1,Hgd1]=ss2tf(A_sg,B_sg,C_sg,D_sg,1)
And I get the answer as Hgn1 =
0 -3.9199 -2.1802 -18.8961 -17.4821 -4.2037 -0.0270 -0.0000
0 0.5998 -2.8770 -30.8747 -21.4438 -2.8173 -0.0020 0.0000
Hgd1 =
1.0000 0.9104 17.3228 16.2183 3.6632 2.2271 0.0285 0.0001
However, as I understand I should be getting only 7 elements in each row. (A_sg 7by7 ,B_sg 7 by 7,C_sg 2 by 7 ,D_sg 2 by 7),1 I alwasys get 1 additional element .
What is the reason for this and how can I eliminate this problem
Thank you very much.

채택된 답변

C.J. Harris
C.J. Harris 2012년 7월 6일
I don't believe there is a problem. The ss2tf function only states that the numerator coefficients are returned in an array with as many rows as there are outputs (two in your case).
Your numerator will always be one longer than the length of your A matrix, while your denumerator will calculated using the 'poly' function, and therefore also appears to be the correct size.
  댓글 수: 1
AVJ
AVJ 2012년 7월 9일
Thank you very much Chris for helping to understand the logic behind the command.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by