connect s-function code with GUI m-file variable.
Show older comments
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 = []
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Functions 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!