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!