As we know, 'hist' function in Matlab plots the histogram of an array. I need to know the numerical value of each bin. Could you help me please?
thanks
When we create a histogram and save it in an object name then we can extract the frequencies as count for the mid values or breaks by calling that object. We can consider that mid values or breaks obtained by the object are the actual value against which the frequencies are plotted on the histogram.
[ counts , binLocations ] = imhist( I , n ) specifies the number of bins, n , used to calculate the histogram. [ counts , binLocations ] = imhist( X , cmap ) calculates the histogram for the indexed image X with colormap cmap . The histogram has one bin for each entry in the colormap.
Description. Histograms are a type of bar plot for numeric data that group the data into bins. After you create a Histogram object, you can modify aspects of the histogram by changing its property values. This is particularly useful for quickly modifying the properties of the bins or changing the display.
Specify Centers of Histogram BinsCreate a bivariate histogram on the bins specified by the bin centers, and count the number of elements in each bin. Load the sample data. Create a bivariate histogram. Specify the centers of the histogram bins using a two-element cell array.
Specify an output for hist
.
[h,bins]=hist(data)
will get you what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With