필터 지우기
필터 지우기

pass struct of variables to Simulink via gui

조회 수: 3 (최근 30일)
Fabian H.
Fabian H. 2014년 3월 15일
댓글: Fabian H. 2014년 4월 14일
Hi guys,
i try to send/pass a properties file which i create in a gui to my Simulink model or at least show it in the workspace so Simulink can catch the variables. The problem is when i execute this:
load('test.mat')
open_system('RakeGAIN16QAM.mdl')
set_param('RakeGAIN16QAM','SimulationCommand','start')
in my command window its fine if i execute this in my callback of the gui i get a lot of errors
function pbuttonStart_Callback(hObject, eventdata, handles)
load('test.mat')
open_system('RakeGAIN16QAM.mdl');
set_param('RakeGAIN16QAM','SimulationCommand','start');
Anybody got an idea, its really frustrating to me, it feels like its not possible to do so.
Thanks F. Hof

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 3월 15일
편집: Azzi Abdelmalek 2014년 3월 15일
function pbuttonStart_Callback(hObject, eventdata, handles)
open_system('RakeGAIN16QAM.mdl');
set_param('RakeGAIN16QAM','initFcn','load test')
set_param('RakeGAIN16QAM','SimulationCommand','start');

추가 답변 (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