WNORMPDF Normal probability density function CALL: f = wnormpdf(x,m,v); f = density function evaluated at x m = mean (default 0) v = variance (default 1) Example: x = linspace(-3,3,200); p1 = wnormpdf(x,0,1); p2 = wnormpdf(x,.5,0.25); plot(x,p1,x,p2)
Check if all input arguments are either scalar or of common size. | |
Display message and abort function. | |
Not-a-Number. |
Saddlepoint approximation of the crossing intensity for the noncentral Chi^2 process | |
Auxiliary function used by RFCDEMO1 | |
Demonstrate the smoothing parameter impact on KDE | |
Plots level-crossing spectrum (lc) | |
Saddlepoint approximation of the crossing intensity for the quadratic sea. | |
Student's T probability density function |
001 function f = wnormpdf(x,m,v); 002 %WNORMPDF Normal probability density function 003 % 004 % CALL: f = wnormpdf(x,m,v); 005 % 006 % f = density function evaluated at x 007 % m = mean (default 0) 008 % v = variance (default 1) 009 % 010 % Example: 011 % x = linspace(-3,3,200); 012 % p1 = wnormpdf(x,0,1); p2 = wnormpdf(x,.5,0.25); 013 % plot(x,p1,x,p2) 014 015 016 % Tested on; Matlab 5.3 017 % History: 018 % revised pab 9Aug2003 019 % fixed a bug: 020 % revised pab 24.10.2000 021 % - added comnsize, nargchk 022 % - added default values 023 % added ms 15.06.2000 024 025 error(nargchk(1,3,nargin)) 026 if nargin<2|isempty(m), m=0; end 027 if nargin<3|isempty(v), v=1; end 028 029 [errorcode, x, m, v] = comnsize (x,m, v); 030 if (errorcode > 0) 031 error ('x, m and v must be of common size or scalar'); 032 end 033 034 f=zeros(size(x)); 035 036 k = find (v>0); 037 if any(k) 038 f(k)=1./sqrt(2*pi*v(k)).*exp(-0.5*(x(k)-m(k)).^2./v(k)); 039 end 040 041 k1 = find (v<=0); 042 if any (k1) 043 tmp=NaN; 044 f(k1) = tmp(ones(size(k1))); 045 end 046 047
Comments or corrections to the WAFO group