how can i plot the simulation results while using sim command and set_param command

1 view (last 30 days)
i=0;
while i<1
sim('Testung',[i,i+0.1])
set_param('Testung/Resistor','Resistance','i')
i=i+0.1;
end
i always get the plot in the scope from t_sim=1 to t_sim=1.1. But how can i get the hole simulation results in the scope? ty thomas
  1 Comment
Kaustubha Govind
Kaustubha Govind on 24 Jul 2014
Each call to the SIM command wipes out the simulation data and starts a new simulation. You can also consider exporting the output signal to the MATLAB workspace and plotting it after all the simulation runs are complete.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!