Want to retain location in a histogram plot

조회 수: 2 (최근 30일)
Bran
Bran 2014년 11월 3일
답변: Star Strider 2014년 11월 3일
I have plotted a histogram using the hist function in MATLAB however, I want to find out the original location of the values in the various bins when they were in my original vector. How do I go about doing that?

채택된 답변

Star Strider
Star Strider 2014년 11월 3일
Use the histc function instead of hist to do that. From the histc documentation:
  • [bincounts,ind]= histc(_) returns ind, an array the same size as x indicating the bin number that each entry in x sorts into. Use this syntax with any of the previous input argument combinations.

추가 답변 (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