2014-09-03 152 views
0

我是matlab新手,我有三個單曲線曲線圖。我需要將所有曲線合併爲一個數字。我該怎麼做?Matlab:合併單個圖中的所有曲線圖

代碼:

figure; 
plot(RedInd,hRed); 
leg = legend('Red','Blue','Green') 
title('Histogram Red Channel'); 


figure; 
plot(BlueInd,hBlue); 
title('Histogram Blue Channel'); 

figure; 
plot(GreenInd,hGreen); 
title('Histogram Green Channel'); 
+1

也可以寫成'圖(RedInd,HRED, 'R',BlueInd,hBlue, 'B',GreenInd,hGreen, 'G');傳說( '紅', '藍', '綠')' – bla 2014-09-03 22:51:28

回答

2

你想用 「堅持」 命令。

例如,

plot(x); 
hold on; 
plot(y); 
plot(z); 
hold off;