simulink plot and compare

1 visualización (últimos 30 días)
Eom
Eom el 2 de Abr. de 2024
Editada: Angelo Yeo el 2 de Abr. de 2024
i use autonomous-emergency-braking-with-sensor-fusion.
and i use sim("AEBTestBench"); % Simulate to end of scenario
helperPlotAEBResults(logsout,scenarioFcnName);
this code to plot.
i want change parameter and compare before change parameter and after change parameter in plot.
How can i compare two graphs (like matlab hold on)

Respuestas (1)

Angelo Yeo
Angelo Yeo el 2 de Abr. de 2024
Editada: Angelo Yeo el 2 de Abr. de 2024
(1) I can see you are working with the example below.
(2) The plot itself is complicated and it would be hard to compare by overlapping signals in the same figure. In my humble opinion, it would be better (or may be recommended) to use different figures to compare the result. This is exactly how it is done in the example as well. The author uses scenario names to set up environment and plot results in new figures. For example,
helperSLAEBSetup(scenarioFcnName="scenario_25_AEB_PedestrianTurning_Nearside_10kph");
sim("AEBTestBench");
helperPlotAEBResults(logsout,scenarioFcnName);
and
helperSLAEBSetup(scenarioFcnName="scenario_23_AEB_PedestrianChild_Nearside_50width");
sim("AEBTestBench");
helperPlotAEBResults(logsout,scenarioFcnName);
(3) Another way is to use the result logs called "logsout". You can keep them by parameters for comparison.
Hope this helps.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by