フィルターのクリア

Why am I getting the wrong output with this MATLAB code

2 ビュー (過去 30 日間)
James Mwage
James Mwage 2019 年 11 月 10 日
コメント済み: Walter Roberson 2019 年 11 月 10 日
why am I gettng the wrong output in MATLAB with this code? The gain in the numerator is 2 in my input but comes out as 0.5 in the output
s=zpk('s');
g5= (2*(s+8))/((s+3)*(s+0.1)*(4*s+6));
%%output
g5 =
0.5 (s+8)
---------------------
(s+3) (s+1.5) (s+0.1)

採用された回答

Walter Roberson
Walter Roberson 2019 年 11 月 10 日
zpk and tf representation normalizes the first coefficient of the denominator to be 1.
  2 件のコメント
James Mwage
James Mwage 2019 年 11 月 10 日
Its the numerator that has the problem.
Walter Roberson
Walter Roberson 2019 年 11 月 10 日
Notice the denominator has 4*s+6 . Normalize that to 4*(s+1.5) in the denominator, and then divide the 2 in the numerator by the 4 in the denominator to get 0.5 in the numerator and 1 in the denominator, and you can see the s+1.5 term in the middle of the output. Therefore the expressions are equivalent. and there is no calculation problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by