How to plot simulink data saved to the workplace?

6 visualizaciones (últimos 30 días)
Omar Paz Medina
Omar Paz Medina el 25 de Abr. de 2019
Comentada: Omar Paz Medina el 25 de Abr. de 2019
I ran a simulink simulation and I saved the data as a workplace block that includes the time and velocity. I also saved two more workplace blocks data that include time and gear and time and improved gear. I want to plot all three together in a graph with two different y-axis. Thanks for the help!

Respuesta aceptada

Raj
Raj el 25 de Abr. de 2019
I assume you want to plot velocity w.r.t time on one side and gear/improved gear w.r.t time on other side of graph. Your code should look something like this:
yyaxis left
plot(time,velocity);
yyaxis right
plot(time,gear,time,improvedgear);
For details see here.
  2 comentarios
Omar Paz Medina
Omar Paz Medina el 25 de Abr. de 2019
I get this error code: Undefined function or variable 'yyaxis'.
Omar Paz Medina
Omar Paz Medina el 25 de Abr. de 2019
I'm also using MATLAB 2015b.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by