Simulink model doesn't output the correct results for a ODE
2 views (last 30 days)
Show older comments
I'm trying to simulate a first order ODE(involving column vector) in simulink. I've written the code for differential equation in matlab files which gives the correct result.But when the same equation represented in simulink doesn't give the correct output.
So i want to know why the simulink model is behaving weirdly or i'm missing some options with simulink or its a bug with simulink.
I'm giving the links for the model and code here. # timeresponse.m http://pastebin.com/X66MV00n # dof3.m http://pastebin.com/kQhk1ab1 # new3dof.slx https://www.box.com/s/pa7dm0edj8r6ngg5wb0d #
0 Comments
Accepted Answer
Azzi Abdelmalek
on 26 May 2013
Edited: Azzi Abdelmalek
on 29 May 2013
The matrices in your simulink model are different from your script, in your simulink model set
Edit regarding to Jan's remarks
the first matrix to Mat1
Mat1=Mass\M1
the second matrix to Mat2
Mat2=Mass\M2
Also, in your scope parameters, uncheck limit data points to last under history
Also, add a gain block with value set to 180/pi to one of your first output
2 Comments
More Answers (0)
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!