How to plot Normal probability density function?
6 views (last 30 days)
I am plotting probability density function by using this command:
mx = mean(RMS_vp); sx = std(RMS_vp); norm_vp = normpdf(RMS_vp,mx,sx);
The problem is shown in the attached figure. First, it do not touches the x axis at left side. Second, when I plot it as solid line (see the image in the center, a lot lines appears as zoom in (blue image).
How can I solve these issues?
Star Strider on 3 Sep 2021
Try something like this:
RMS_vps = sort(RMS_vp);
norm_vp = normpdf(RMS_vp,mx,sx);
RMS_vpe = linspace(mx-5*sx, mx+5*sx, 250);
norm_vpe = normpdf(RMS_vpe,mx,sx);
One (or both) of those should do what you want.