what can be used instead of histcounts
Show older comments
i need a vector of the values from histogram data. instead histcounts what code or function can be used.
3 Comments
Steven Lord
on 30 May 2018
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.
divya balu
on 31 May 2018
Answers (3)
Walter Roberson
on 31 May 2018
1 vote
In older versions such as R2014a, the closest equivalent routine is histc()
Yuvaraj Venkataswamy
on 30 May 2018
Edited: Yuvaraj Venkataswamy
on 30 May 2018
0 votes
Image Analyst
on 30 May 2018
0 votes
You can use imhist(), or histogram(), or histc() or hist(). Or you can do it yourself with a for loop.
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!