Reputation: 11
I have a problem with .mat file and Simulink. I need to input data from .mat file to Simulink but not signals, i need to input variables in blocks. Block "From File" doesn't do any good for me since it only uses signals.
Is there any way for me to use Simulink Callbacks, PreLoadFcn or InitFcn? Or is there some other way to do this?
Upvotes: 0
Views: 7220
Reputation: 4477
You can specify MAT file as input for your model workspace data using Model explorer. Open model explorer from the view menu and then choose "model workspace". You will see option to specify different ways for getting data on the rightmost pane. Choose MAT-File in this. You will be able to reference to the variables from this MAT file in your model. You can find more info at http://www.mathworks.com/help/simulink/ug/the-model-explorer-working-with-workspace-variables.html.
Upvotes: 1