error in the output of "ss2tf"

8 views (last 30 days)
AVJ
AVJ on 6 Jul 2012
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.

Accepted Answer

C.J. Harris
C.J. Harris on 6 Jul 2012
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 Comment
AVJ
AVJ on 9 Jul 2012
Thank you very much Chris for helping to understand the logic behind the command.

Sign in to comment.

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!