I have a function (looks like gaussian) and I want to plot it such that the area under the plot is always 1 (power normalization). I know it is done by dividing the function by its L2-norm. What is interesting here is, when the sample size increases, maximum value of the function decreases. here is the code:
al=-pi/2: pi/10: pi/2;cf=((1+cos(al))/2).^1;plot(al,cf/norm(cf));hold on;al=-pi/2: pi/100: pi/2; %increase the sample size
cf=((1+cos(al))/2).^1;plot(al,cf/norm(cf));
It must be independent of the sample size. It seems I need to multiply cf with length(cf) or length(cf)^2 to get a fixed maximum value for a normalized power but couldn't find out a takeaway from that.
Thanks in advance.
Best Answer