how to draw two graphs on same figure in matlab

2 visualizzazioni (ultimi 30 giorni)
Muhammad Aamir
Muhammad Aamir il 7 Dic 2013
Commentato: sixwwwwww il 7 Dic 2013
i want to compare two graph for this i need to draw both on same can i do this?

Risposte (2)

sixwwwwww il 7 Dic 2013
x1 = 0:10;
y1 = randi(100, 1, numel(x1));
x2 = 0:100;
y2 = randi(100, 1, numel(x2));
plot(x1, y1, x2, y2)
  2 Commenti
sixwwwwww il 7 Dic 2013
can you show your codes for leach and modleach?

Accedi per commentare.

Wayne King
Wayne King il 7 Dic 2013
Modificato: Wayne King il 7 Dic 2013
Have you tried simply hold on;
x = randn(100,1);
y = randn(100,1);
plot(x); hold on;
Or simply:
If you need different scales for the y-axis see plotyy()


Scopri di più su Discrete Data Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by