Filter löschen
Filter löschen

Simulink/Matlab diference

1 Ansicht (letzte 30 Tage)
Cosmin Darab
Cosmin Darab am 6 Okt. 2011
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 Kommentare
Titus Edelhofer
Titus Edelhofer am 6 Okt. 2011
Hi Cosmin,
are the differences large (i.e., not "just" roundoff?). What results do you get?
Titus
Cosmin Darab
Cosmin Darab am 7 Okt. 2011
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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Okt. 2011
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.)

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by