フィルターのクリア

Simulink/Matlab diference

1 回表示 (過去 30 日間)
Cosmin Darab
Cosmin Darab 2011 年 10 月 6 日
Hy Is there a way that I can use roots in simulink and get the same result as in matlab? Does simulink use a different compiler than matlab?(I use roots in a matlab embaded function in simulink and get different results than in matlab). Thank you.
  2 件のコメント
Titus Edelhofer
Titus Edelhofer 2011 年 10 月 6 日
Hi Cosmin,
are the differences large (i.e., not "just" roundoff?). What results do you get?
Titus
Cosmin Darab
Cosmin Darab 2011 年 10 月 7 日
Hi,
The results are almous the same but the last zecimals don't assembly(eg.0.001235876 and 0.001235012) but I use this numbers in an logarithm and the resuls are way different.
Thank You

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

採用された回答

Walter Roberson
Walter Roberson 2011 年 10 月 6 日
Simulink uses a different algorithm, and is documented as possibly returning the roots in a different order. So sort() the complex numbers and you should be fine to within roundoff limits (unless the polynomial was badly scaled.)

その他の回答 (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