Running simultaneously a GUI file and Simulink model with S-function
显示 更早的评论
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=[]
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!