Histogram part of data in matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I would like to see a histogram of a data that stored in 2d matrix that is >0.1. how can I do that? For example in matrix A=[1,2,3;4,5,6]. I want to histogram only data >3. any help will be appreciated.
댓글 수: 0
채택된 답변
Image Analyst
2012년 3월 14일
Try this:
m = 10*rand(100,1);
[counts, bins] = hist(m(m>3), 50);
bar(bins, counts);
xlim([0 10]);
grid on;
댓글 수: 3
Image Analyst
2012년 3월 15일
You can use a line plot with plot() instead of bars with bar() if you want.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!