Can't plot Simlog

조회 수: 2 (최근 30일)
Emre S
Emre S 2019년 11월 11일
답변: Jesús Zambrano 2020년 2월 7일
I want to simulate a simulation via Matlab code(in .m file) in Simulink.
sim('Mysim');
plot(f(:,1),f(:,2))
hold on
plot(simlog.poppet.flow_rate,'units','lpm');
Unfortunately it gives me error. But it can plot the figure if I write this comment into the Command Window. I feel terrible because of this stupid error.
If you have any idea, please don't hesitate.
Sincerely,
Emre

답변 (1개)

Jesús Zambrano
Jesús Zambrano 2020년 2월 7일
Hi Emre,
Where exactly did you put this 4 lines of code? I guess it is a separate script that calls the model and the the plotting. If it works in the command window, it should work from a script.
Please attach the model and the script so to have a look and see if I find out the issue.
Best,
Jesús

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by