How to import matlab file variables in Simulink (By adding some block in Simulink Model)

1 次查看(过去 30 天)
I have seen in some Simulink Model, there was a block with the M-File. You just double click that file, it gets executed and variables are available for Simulink Model. Can anybody help me to find the way to do it. Thanks

采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-10-27
That is probably a customized mask of a subsystem block. Assume the M-file you want to run is MyParam.m, you can drag an empty subsystem block, right click, select 'block properties', select 'Callbacks' tab, select 'OpenFcn', type in MyParam.
You can even mask it by select the block, press ctrl+M, in the 'Drawing Commands', put in disp('MyParam').

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by