看板 MATLAB 關於我們 聯絡資訊
figure data = [0,2,9,2,5,8,7,3,1,9,4,3,5,8,10,0,1,2,9,5,10]; [nelements,centers] = hist(data); H = bar(centers,nelements); set(H, 'BarWidth', 0.4); % 改第三個輸入 ※ 引述《sleeeve (赴美留學的日子...)》之銘言: : figure : data = [0,2,9,2,5,8,7,3,1,9,4,3,5,8,10,0,1,2,9,5,10]; : hist(data) : 類似像這樣簡單的code,如何選擇想要的bin width呢? : 譬如說我不想這麼寬,想窄一點的話? : 如果改成 hist(data,0.5) 這樣圖跑不出來@@ : Thanks -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 172.250.128.199
sleeeve:感謝 10/10 15:03