필터 지우기
필터 지우기

sub histogram from histogram

조회 수: 2 (최근 30일)
Manish Sharma
Manish Sharma 2016년 6월 23일
댓글: Muhammad Usman Saleem 2016년 6월 23일
i have a = [1,1,1;1,2,3;2,1,4;1,1,3;2,1,2;1,3,2] and i form histogram of matrix "a" by hist(a)
now I want to make histogram of all the columns of matrix"a" separately. how this is performed and what if i have 100x100 matrix then how will this be achieved.

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2016년 6월 23일
Perhaps something like:
for i1 = 1:size(a,2)
[H1{i1},H2{i1}] = hist(a(:,i1));
end
stairs(H2{2},H1{2})
hold on
stairs(H2{1},H1{1},'g')
stairs(H2{3},H1{3},'r')
You should presumably look into using a second argument to hist but that you'd decide better than I guess...
HTH
  댓글 수: 2
Manish Sharma
Manish Sharma 2016년 6월 23일
thanks for prompt reply i will try this and will post if any issue arises.
Muhammad Usman Saleem
Muhammad Usman Saleem 2016년 6월 23일
please post in the form of image you got in output

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by