what can be used instead of histcounts

i need a vector of the values from histogram data. instead histcounts what code or function can be used.

3 Comments

Why do you not want to use histcounts? That's the right tool for collecting bin counts for a set of 1-D data. Are you using a release older than release R2014b, when histcounts was introduced? Are you not allowed to use it because you've been given a homework assignment to implement your own?
If instead of the bin counts you want a vector the same size as your input indicating into which bin each element falls, see the third output of histcounts or the output of the discretize function.
I am using R2014a

Sign in to comment.

Answers (3)

In older versions such as R2014a, the closest equivalent routine is histc()
You can use imhist(), or histogram(), or histc() or hist(). Or you can do it yourself with a for loop.

Categories

Asked:

on 30 May 2018

Answered:

on 31 May 2018

Community Treasure Hunt

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

Start Hunting!