Matlab "fill" command

Status
Not open for further replies.

JoeFahey

Platinum Member
Jan 15, 2005
2,163
1
0
If I want to plot two graphs at the same time, what command do I use?
 
Last edited:

gwai lo

Senior member
Sep 29, 2004
347
0
0
yeah if you want to do two separate plots, then do

subplot(rows,columns,number)

so like, subplot(2,2,1) creates a single figure with 2x2 plots, i believe subplot one is the top left, you do the next one as subplot(2,2,2), and so on

if you want to do two functions on the same plot, then use "hold on", e.g.

plot(x,y1)
hold on;
plot(x,y2)
hold off;
grid;
 
Status
Not open for further replies.