I have a simulink model. I would like to import all the inputs, outputs, locals and all other parameters to an Excel sheet.
can someone please help me how to do this?
Regards,
R.S.
Then reverse the process an use xlswrite to put results back into Excel.
Phil.
Regards
Rajesh
"Phil Goddard" <philN...@modeling-simulation-visualization.com> wrote in message <irq1va$ocj$1...@newscl01ah.mathworks.com>...
All things that are required by your model, e.g. parameters and input data, should be defined in MATLAB first and the model, on initialization, should get that info from MATLAB.
e.g. if the amplitude of a sine wave needs to be 4 (for instance) you should define a MATLAB variable, say sineAmp, as simeAmp=4, then in the appropriate Simulink parameter dialog you should type sineAmp (not hard code the number 4).
But if for some reason you really decide that you need to get the value of a parameter from the model then you would use the get_param function, see
>> doc get_param
The are multiple different ways to push data generated by your model into MATLAB: though an Outport block; through a Scope block; using a To Workspace block, just to name three ways.
Then it's just a matter of creating an appropriate cell array to use with xlswrite.
Phil.
to get a list of all variables that a model uses.
Phil.