Simulink/Matlab diference
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Titus Edelhofer
il 6 Ott 2011
Hi Cosmin,
are the differences large (i.e., not "just" roundoff?). What results do you get?
Titus
Risposta accettata
Walter Roberson
il 6 Ott 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.)
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!