import an old simulink model from 1995
Afficher commentaires plus anciens
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 commentaires
Fangjun Jiang
le 17 Juin 2020
Are you sure the Simulink model (graphical diagram) file is a .m file? Could show a snip of the .m file?
Bart Verlaat
le 17 Juin 2020
Modifié(e) : Rik
le 17 Juin 2020
Réponses (1)
Fangjun Jiang
le 17 Juin 2020
Modifié(e) : Fangjun Jiang
le 17 Juin 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.
Catégories
En savoir plus sur Programmatic Model Editing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!