How to solve plotting different data in same figure when x-vectors are not the same?
Mostrar comentarios más antiguos
Hi,
I am trying to plot 2 data in a plotyy(X1,Y1,X2,Y2) fashion. However the data x1 and x2 does not have the same timescale. Here data where x1, x2 is the time and y1 and y2 are two different kind of data. I like to plot them in same plot to show the correspondence reaction between them.
However x1 and x2 starts and ends at different times and I am not sure they share the same data points per second or per minute.
How do I solve this problem? How to plot x1, y1, x2, y2 in the same plot to compare when x-vectors and y-vectors are different? I like to compare the y-vectors.
1 comentario
Respuestas (2)
Arun Kumar
el 17 de Mzo. de 2015
0 votos
use "hold on" function
Ilham Hardy
el 17 de Mzo. de 2015
Does this work?
plot(x1,y1,x2,y2);
Categorías
Más información sobre Two y-axis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!