Sunday, July 20, 2014

Plot on Specific Figure in Matlab

You might be interested to have different plots in seperate figures in your code. when you create a figure make sure you assign it to a handle:
fig1=figure(1) 
fig2=figure(2) 

Then later in your code when you want to plot that particular figure. first make that figure your current figure:

 figure(fig1)  
 subplot(2,1,1)  

then continue with your code and and for the other figure again change to that figure:



 figure(fig2)  
 plot(x)  

No comments:

Post a Comment