看板 MATLAB 關於我們 聯絡資訊
各位大大好 請問 我要怎麼把 一維的array 做成histogram x軸 是 array的大小 (1~64) y軸 是 array裡面儲存的數字 ex. _1__2__3__ _5__8__7__ 我想要畫成 http://ppt.cc/ajf3 這是我一直寫錯的code ˊ_____ˋ I=array(1,:); siz=size(I); I1=reshape(I,64,1); I1=double(I1); figure(2),[N,X]=hist(I); bar(X,N); xlim([1 64]); hold on plot(X,N); hold off 請各位 大大 幫忙了! 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.120.54.72
DKer:x=[1 2 3]; y=[5 8 7]; stem(x,y); 09/12 09:15
mp19990920:help hist/histc 09/12 09:37