11 views (last 30 days)

Show older comments

Hello everyone,

I need to normalize a histogram, so that the histogram maximum is equal to 1. I want to divide by the maximum No. of values in each bin.

I tried to normalize using cumcount but it doesn't give me the graph I want although it gives me the limit of histogram between 0, and 1.

I need to plot a graph like this

any suggestions??

Thanks

Ebtesam

Image Analyst
on 27 Jun 2021

Just divide by the max

counts = histcounts(data);

counts = counts / max(counts);

Seems so obvious - am I missing something?

Image Analyst
on 27 Jun 2021

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

Start Hunting!