import an old simulink model from 1995
5 views (last 30 days)
Show older comments
Hello,
I want to load an old simulink model I made back in 1995. At this time simulink was still an .m file. I can load and see the text, but running it doesnot give me the wireframe model in the simulink window.
Does anybody know the tricks to get this old model working again in simulink?
Regards, Bart
2 Comments
Fangjun Jiang
on 17 Jun 2020
Are you sure the Simulink model (graphical diagram) file is a .m file? Could show a snip of the .m file?
Answers (1)
Fangjun Jiang
on 17 Jun 2020
Edited: Fangjun Jiang
on 17 Jun 2020
This .m file is still valid on its concept. It runs M-script or commands to create a Simulink model on-the-fly. If you run "dynaship" you can see a blank Simulink is opened. But some of the Simulink model properties have been changed so this dynaship.m could NOT successfully create the Simulink model.
The first line of probelm is
set_param(sys,'algorithm', 'RK-45')
you need to change it to
set_param(sys,'solver','ode45')
And then many other lines.
The point is, Simulink was never a .m file. Simulink was a .mdl file and now it could be a .mdl or a .slx file.
Your .m file contains commands such as new_system(), set_param(), add_block(), add_line() to create the Simulink model. These commands are still valid but the model properties have been changed.
0 Comments
See Also
Categories
Find more on Subsystems 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!