필터 지우기
필터 지우기

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

조회 수: 1 (최근 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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by