필터 지우기
필터 지우기

how to organize my histogram please

조회 수: 1 (최근 30일)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018년 4월 24일
편집: Star Strider 2018년 4월 24일
Dear All, I have a column matrix Called (Load), it represents the Loads of Vehicles, the dimension for this matrix is 1000 by 1, I was ytrying to draw the histogram for this matrix using the following code, it means I need 39 Load Bins in the histogram, my question is: how can I tell MATLAB to draw this histogram with 39 bins but starting from 3000 ending with 41000? I need to define the boundaries and number of bins together. my code is:
histObject=histogram(Load,39,'Normalization','probability');
Please help

채택된 답변

Star Strider
Star Strider 2018년 4월 24일
Try this:
edges = linspace(3000, 41000, 40); % Define 39 Bins With 40 Edges
histObject = histogram(Load, edges, 'Normalization','probability');
  댓글 수: 9
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018년 4월 24일
It really keeps giving me an empty chart even i wrote the same as you did. any way thank you very much for your help
Star Strider
Star Strider 2018년 4월 24일
편집: Star Strider 2018년 4월 24일

As always, my pleasure.

I am using R2018a if that is important.

I would suggest that you see if the histfit function will do what you want. (I have not used it here.)

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

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