connect s-function code with GUI m-file variable.
Ältere Kommentare anzeigen
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 = []
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simulink Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!