How do you bin data by a certain value? and count the values in each bin?

조회 수: 1 (최근 30일)
Graduate Student
Graduate Student 2018년 5월 16일
답변: the cyclist 2018년 5월 16일
How do you bin data by a certain value? For example I have 1 column of data that consists of numbers that represent time in seconds. I would like to bin the data by 500ms, therefore .5. (I attached the dataset I'm working with)
I've attached the dataset I'm working with here.
An example would be:
  • First bin: 0 thru 0.5 --> 1 counts
  • Second bin: .05 thru 1 --> 4 counts

답변 (1개)

the cyclist
the cyclist 2018년 5월 16일
Use the histcounts command.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by