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

Antworten (1)

Jesús Zambrano
Jesús Zambrano am 7 Feb. 2020

0 Stimmen

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

Kategorien

Mehr zu Foundation and Custom Domains finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018b

Gefragt:

am 11 Nov. 2019

Beantwortet:

am 7 Feb. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by