フィルターのクリア

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
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 15 日
What test.mat contains?

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

採用された回答

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');
  1 件のコメント
Fabian H.
Fabian H. 2014 年 4 月 14 日
Thanks, works perfect.

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by