connect s-function code with GUI m-file variable.
显示 更早的评论
Hi, I have an s function block written in level 1 matlab which has a sine wave input from a simulink model. I want to pass its amplitude value in real time to a variable in the gui m file which is responsible for controlling the movement of an object. Also, I want to know how to draw the sine wave and gui into two different axis because they are always plotted in the same axes while the other axes is empty. Below is my output function of the s function code in which the sine wave input is referred to with u(2)and u(1) referred to time input from a clock.
function sys=mdlOutputs(t,x,u)
fig=guicode;
n=u(2);
sys = []
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!