How to output a tout from Simulink space to Matlab so that it reads the value to us?
조회 수: 67 (최근 30일)
이전 댓글 표시
During the simulink simulation, I have a problem with the derived "tout" in m-matlab file gives me an error "Unrecognized function or variable 'tout'." but tout is in the workspace in ANS, I wanted to draw the graphs in matlab and I derived "OUT" from the simulink, and "tout" from the simulation. Please help me and best regards.
sim('cw_6_silnik') % simulink file name
t=tout;
delta=yout(:,1);
n=yout(:,2);
T_e=yout(:,3);
T_a=yout(:,4);
P_e=pi/30*T_e.*n;
figure(1)
plot(t,delta,'b'), grid on
xlabel('t [s]')
ylabel ('\delta [deg]')
댓글 수: 0
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!