matlab如何統計矩陣各元素的出現次數

matlab如何統計矩陣各元素的出現次數post 方法一:blog 假定要分析的矩陣爲data, x=data(:) x=sort(x); d=diff([x;max(x)+1]); count = diff(find([1;d])) ; y =[x(find(d)) count] 最後輸出的y(1)爲元素值,y(2)爲所對應的元素值在此矩陣中的出現的次數class 方法二:方法 製圖: hist
相關文章
相關標籤/搜索