When you do xRange = 0:1;
you get a 2-element vector [0 1]
. That is probably not what you want. Specify a step like:
xRange = 0:0.01:1;
Plotting each element as a point is accomplished in MATLAB with the line specifier argument, like plot(xRange,N./numel(A),'*')
. However, for a histogram with only a small number of bins, you might be better off with bar(...)
. If you go with a finer step, then plotting might be better.