import an old simulink model from 1995
이전 댓글 표시
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
Fangjun Jiang
2020년 6월 17일
Are you sure the Simulink model (graphical diagram) file is a .m file? Could show a snip of the .m file?
Bart Verlaat
2020년 6월 17일
편집: Rik
2020년 6월 17일
답변 (1개)
Fangjun Jiang
2020년 6월 17일
편집: Fangjun Jiang
2020년 6월 17일
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.
카테고리
도움말 센터 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!