Why do I get a different response when using the "step" command in the command line and the scope in Simulink?
5 次查看(过去 30 天)
显示 更早的评论
I have a MIMO (10 outputs and 5 inputs) state transition matrix I don't understand why do I get different responses when invoking a step input in the command line and in Simulink. Can someone give me a light on this?
0 个评论
采纳的回答
Birdman
2017-10-30
编辑:Birdman
2017-10-30
It is because of the solver. In Simulink, you probably use variable step solver, which is more accurate. In MATLAB Command line, you can overcome this situation by making the simulation with a small step size that you define, so you will get more accurate results.
t = 0:1e-6:10;
step('your model',t)
Try the code above.
2 个评论
Birdman
2017-10-30
It is up to you. The code above is to improve the performance of the step function in command line.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!