Generating executables of a simulink model called from a .m file of a GUI.

1 view (last 30 days)
I have a simulink model consisting of a step input, a transfer function and a scope. Its basic functionality is to generate the step response of the transfer function.
Assume that the parameters of the transfer function are K1, T1. The values of K1,T1 are assigned during runtime using a GUI. From the GUI the values are stored in the base workspace and then used in the simulink model.
So my module has .fig , .m and a .mdl file interlinked. Further, I save the scope data in a local workspace - retrieve it in the .m file and display it on the GUI using axes. Everything is working fine.
Now, I have to convert the whole module into a .exe file. I know how to convert basic .m/.fig files into .exe using matlab compiler. But since my module has an interlinked .mdl file, I am not able to convert it into a successful .exe file.
I read in the forum that I have to first convert the .mdl file into .exe using RSIM ( simulink coder) and change the matlab code to call this new .exe file using ! command. However I am not able to convert the .mdl file to .exe since I am using unassigned variables K1,T1.
How do I solve this issue? What is the exact procedure to convert such interlinked modules into a .exe file ?
I request your guidance since I couldn't find a procedure to accomplish my task of converting a (matlab+simulink) module into a .exe file.
I am using MATLAB R2012b , Simulink Coder Version 8.3 , MATLAB Compiler Version 4.18 and I have also installed MCR.
Thank You !

Answers (0)

Categories

Find more on Simulink Coder 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!