error in the output of "ss2tf"

8 次查看(过去 30 天)
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