Simulink/Matlab diference
1 次查看(过去 30 天)
显示 更早的评论
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
2011-10-6
Hi Cosmin,
are the differences large (i.e., not "just" roundoff?). What results do you get?
Titus
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!