Convert m-code into state space block
3 次查看(过去 30 天)
显示 更早的评论
I'm trying to convert a feedback control system that I've implemented in M-code into a Simulink model.
In the code, I used the 'ss' function and 'lsim' to obtain results.
However, even though I input the same state equations and control inputs, the results diverged when using a state-space block in the Simulink model.
I'm wondering if anyone has experienced a similar issue and if I could get some assistance with this. Have you ever encountered a situation like this?
2 个评论
Sam Chak
2023-8-10
Hi @Junghyo Kim
Could you please attach the m-file by clicking on the paperclip icon ?
Alternatively, you can copy and paste the MATLAB code. Click on this icon to enable the Code mode (grey field).
paste the code
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dynamic System Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!