Parameter norm for function hist

I want to us : hist(y, x, norm), but I get an error message I don’t understand:

I tried to run : [dwhistdata,testy]=hist(dwforhist,[0:1:255],norm)
and got in return : error: Invalid call to norm. Correct usage is:

I simply want a normalized count.
For explanation: dwforhist ist a vector containing all the grey-values of a picture, so I want to have a normalised count for every grey-value.

Thanks in forward

Thanks for your report. Can you give a minimal complete example (with all input data dwforhist and norm) to reproduce your error?

I think my problem is, that I don’t know, what the parameter norm stands for. Is it a method? If so how do I know these methods? and how to use them.

In my usage above it is only the word “norm”, because there is no explanation for it.

And of course I can calculated it by my self by simply devide the histcount by the sum of all counts, but since there is a “norm” I wanted to use it.

try replacing te word norm with a number.
ie. a 1.
It is the value that you want to normalize it to.

Thanks for your help, that was, what I was looking for. But there was no way for me to understand the doc entry for the function hist.

If a third argument is provided, the histogram is normalized such that the sum of the bars is equal to norm.

Why don’t the use the sentence

If a third argument is provided, the histogram is normalized such that the sum of the bars is equal to the value spezified by the variable norm.

Would have helped me since in matlab (can’t use it anymore) norm is a method to be spezified.

You are right, the documentation does not really reflect all use cases of the third “norm” parameter. I opened GNU Octave - Bugs: bug #60783, hist: better documentation for... [Savannah] to make it clearer.