How to generate .m file from SIMULINK model (.mdl file)?
207 views (last 30 days)
hi, i have to use a simulink model and a matlab program for my project. but i need to switch between those to continuously and automatically. (without human intervention.).
so, as it is not possible, i want to generate .m file from simulink model, which can exactly replace the .mdl file output so that, i can include that program in my actual program. the viceversa is also acceptable.
Andreas Goser on 29 Jun 2011
In case you are at the beginning of your project, you could try to work MATLAB based and include the (same) code within Simulink, e.g. using Embedded MATLAB.
I you have a Simulink model, I do not know if there is a way to bring the model into MATLAB code, but you could always obtain the results in MATLAB bei using the SIM command.
Destiny Chukwuma on 15 Mar 2018
Please I have the same challenge. Can someone assist with specific steps to attempt concoverting block models to .m file so that other programs can be integrated onto it. Thanks