how to load .mat in GUI every time the GUI runs and the GUI connect to simulink model

2 ビュー (過去 30 日間)
Dear everyone..
i have .mat file that contain so many variable, for example Alphabet.mat contains variable a=1,b=2,c=3,d=4.....
i want to load Alphabet.mat every time i run my GUI program that contain simulink model, and also the variables inside alphabet.mat are used in simulink model...
i have tried load alphabet.mat, uigetfile still cannot any suggestion??

採用された回答

C.J. Harris
C.J. Harris 2012 年 1 月 11 日
You call add a call to load('alphabet.mat') within the Simulink model's InitFcn callback if the parameters are only needed by the Simulink model.
From within your Simulink model see:
File->Model Properies->Callbacks
  9 件のコメント
C.J. Harris
C.J. Harris 2012 年 1 月 12 日
http://www.mathworks.co.uk/support/solutions/en/data/1-1LXNAM/index.html?product=SL&solution=1-1LXNAM
Luhur
Luhur 2012 年 1 月 12 日
thanks chris... :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNaming Conventions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by