Real-Time GUI output into Simulink block

1 view (last 30 days)
Aimi
Aimi on 21 Apr 2014
Hi,
I am trying to integrate between a GUI and simulink. And I expected an output from the GUI as the input for my simulink. But the problem is, I need to close my GUI everytime after I get an output from that, the reopen the GUI to get another set of output. And everything is saved in Result.mat as commanded in GUI. FYI, i am using MATLAB 2011 version
save('Result','input2','color2','code2','code3','probsad','probhappy','probnervous','emotionNB',' datas','AutomataInput','Inputs')
For your information, I expected the AutomataInput variable (a constant) as the output from the GUI. Since I use 'from workspace' block, it requires at least 2x2 matrix as the input for my simulink. So I make a 2x2 matrix from the AutomataInput and name it is Inputs.
My question is 1. Instead of using 'from workspace' block, is there any other block I can use to integrate the GUI and simulink? 2. Instead of saving the GUI output in Result.mat and close the GUI everytime I get a set of output, is there any other way to make my system in real-time, I mean, whenever I change the input for GUI, the output will also change, and it will cause the input for my simulink change.
Thank you very much for your help.

Answers (0)

Community Treasure Hunt

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

Start Hunting!