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