Running simultaneously a GUI file and Simulink model with S-function
Show older comments
Hi, I have 3 files: (1) Simulink model (2)S-function level 1 matlab code (3)M-file GUI with object drawing.The simulink model feeds a sine wave into an S function block. I want is to get the output of the S-function into a variable in the GUI file. When I run the GUI file which was designed with the help of guide, the simulink model start running using the command Sim() until the simulation time finish then the object drawing start to appear. What I want is that they run simultaneously because I want to control the movement of the object with the output of the S-function. Please advice me on this issue. See my S- function output function:
Function [sys,x0,str,ts]=mdlOutputs (t,x,u) fig=myGUI hnaldes=guidata(fig) n=u(2) handles.myGUI.angle=n sys=[]
Accepted Answer
More Answers (0)
Categories
Find more on Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!