Combining separate graphs into one and changing the scale to match
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
EngTat Chung
el 9 de Feb. de 2020
Comentada: EngTat Chung
el 9 de Feb. de 2020
I have two seprate graphs obtained from Simulink. I am able to plot them individually however I need to plot then one over another.
How do I scale the graph so that they match each other? To be able to find the area where they do not overlap.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/270646/image.jpeg)
0 comentarios
Respuesta aceptada
Thiago Henrique Gomes Lobato
el 9 de Feb. de 2020
You can do the first plot, plot the second one over it and then rescale the y axis to the values of the first plot (since the second has a way bigger value range) . Something like:
plot(time,data1)
hold on
plot(time,data2)
ylim([120,300])
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!