Borrar filtros
Borrar filtros

Doubt in XY Graph

2 visualizaciones (últimos 30 días)
Nuno
Nuno el 28 de Mzo. de 2011
Hi... I have the next simulink model: http://img96.imageshack.us/img96/1546/circuity.png
The results is: http://img34.imageshack.us/img34/9643/graphicsc.png
I liked that the two curves were in the same graph. How do I?

Respuesta aceptada

Arnaud Miege
Arnaud Miege el 28 de Mzo. de 2011
It's not possible, the XY Graph only accepts scalar inputs, which means that you can only plot one x-y graph at a time.
I would suggest storing the relevant data to the MATLAB workspace using To Workspace blocks, writing a MATLAB function or script that gets executed when the model completes its execution through the StopFcn callback (see Using Callback Functions in the Simulink documentation for more details). Then you can use the hold on in your MATLAB code command as suggested above.
HTH,
Arnaud
  1 comentario
Nuno
Nuno el 28 de Mzo. de 2011
Thanks Arnaud!

Iniciar sesión para comentar.

Más respuestas (1)

Gireg
Gireg el 28 de Mzo. de 2011
Hi, You should use the Matlab command "hold on".
Example:
hold on
plot([0,1],[0,2]);
plot([0,1],[0,3]);
I don't know if my example is understandable...

Categorías

Más información sobre Specifying Target for Graphics Output 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