Setting up a Simulink model from GUI in a way that allows me to compile afterwards

Okay, here's my problem, I'm implementing a Simulink model which is to be setup and executed from a GUI. So far so good, I already have a prototype with some of the functionality up and running.
The thing is, it may be required from us for this model to be delivered as a stand alone compiled file(s) so that it can run on machines which don't have Matlab installed.
Now I already know you can't compile a simulink model with Matlab compiler, the workaround for this issue is explained here: http://www.mathworks.es/support/solutions/en/data/1-27DUK5/index.html
But here's my problem, I want to set the value of a number of block parameters from the GUI (Things like Gain and Constant values), I'm already doing this in the interpreted version of my model using set_param, etc. But I can't do that if I want to compile.
I'm relatively new to Matlab/Simulink, but would it be a valid solution to, even as the input data, generate a .MAT file from the GUI before executing the simulation, and then use a startup script on the Simulink model to load the file and set the block parametres from the data in the file? If so, could you give me some advise on how to do this?
If it's not possible or there's a better solution/workaround for my problem, could you please enlighten me?
Many thanks!

Answers (1)

Since you need to run the model on a machine that does not have MATLAB/Simulink installed, I presume you plan to use Simulink Coder to generate a standalone shared library that you have call from your GUI? You can only change tunable parameters in a compiled model (you will need Simulink installed if you need to change nontunable parameters). See Parameter Tuning in the Simulink Coder documentation to find out how you can tune parameters in the generated shared library.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Asked:

on 25 Apr 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!