2011-12-01 68 views

回答

1
Y = [5 1 2 
    8 3 7 
    9 6 8 
    5 5 5 
    4 2 3]; 
bar(Y,'stack') 
hold on 
Ys = sum(Y,2); 
stacked = [1 2];  
Ys(stacked) = 0; 
bar(Ys,'facecolor','y') 

enter image description here

+0

非常好!謝謝! – MetallicPriest