2013-10-14 98 views
1

我使用errorbar()函數在Matlab中進行繪圖。我有一組具有平均值,最大值和最小值的數據,但有些點的最大值和最小值與平均值相匹配。因此,當我plkot errorbar我得到這樣的東西: enter image description hereErrorBar Plot Matlab

事情是,我不想有這些水平線。垂直的是那些平均值不同於我仍然想要保留的最大值和最小值的值。任何幫助?

pd: h1= errorbar(x,y,min,max) 
+0

你有沒有通過這個文檔閱讀了嗎? http://www.mathworks.com/help/matlab/ref/errorbarseriesproperties.html – Dan

+0

是的!但是並沒有對這個單獨的案例說些什​​麼。你可以改變線條樣式,但我想要的只是在最大值和最小值相等的情況下得到一個點 – JPV

回答

1

你可以繪製兩個系列:

h1 = plot(x,y); % for the central points 
idx = min ~= max; 
h2 = errorbar(x(idx),y(idx),min(idx), max(idx));