0

I am new to MATLAB and would like to normalize a vector of data so that the area of all the bars is equal to 1? I put a question mark because I am still trying to learn what normalization really is. Can someone guide me in understanding?

Say my vector is:

v = [1 2 3 4 1 2 3 4]; 

I know that I need to put this into a histogram, then sum the number of data points within each bin and divide by the bin size (width), but I'm not really sure how to go about doing this and what my next step would be. Thanks.

Also i did ask a similar question yesterday, but didn't know enough to ask it efficiently, so here I am again.

nukenine
  • 195
  • 1
  • 4
  • 12
  • When reading the duplicate question, note that integer samples and a bar with of `1` is a special case. You might be unable to detect the difference between the methods. – Daniel Mar 03 '16 at 14:55
  • @Daniel Not quite sure what you mean, also, can I ask, the top answer to the duplicate question starts with: [f,x]=hist(randn(10000,1),50); What is f in this case? – nukenine Mar 03 '16 at 15:00
  • Read the documentation for `hist`. With my previous comment I wanted to say: Take the example from the answers first to understand it, then try your data. – Daniel Mar 03 '16 at 15:06

0 Answers0