WGAMPDF Gamma probability density function CALL: f = wgampdf(x,a,b); f = density function evaluated at x a = parameter b = parameter (default b=1) The Gamma distribution is defined by its pdf f(x)=x^(a-1)*exp(-x/b)/gamma(a)/b^a, a,b>0, x>=0. Example: x = linspace(0,7,200); p1 = wgampdf(x,1); p2 = wgampdf(x,2); plot(x,p1,x,p2) See also wggampdf
Check if all input arguments are either scalar or of common size. | |
Generalized Gamma probability density function | |
Display message and abort function. |
Brodtkorb (2004) joint (Scf,Hd) PDF from Japan Sea. | |
Brodtkorb (2004) joint (Scf,Hd) PDF of laboratory data. | |
Brodtkorb et.al (2000) joint (Scf,Hd) PDF from North Sea. | |
is an internal function to dist2dcdf dist2dprb. | |
Joint 2D PDF computed as f(x1|X2=x2)*f(x2) | |
Joint 2D PDF due to Plackett given as f{x1}*f{x2}*G(x1,x2;Psi). | |
Joint (Scf,Hd) PDF for nonlinear waves with Torsethaugen spectra. | |
Joint (Scf,Hd) PDF for linear waves with Torsethaugen spectra. | |
Joint (Scf,Hd) PDF for linear waves with Torsethaugen spectra. | |
Joint (Scf,Hd) PDF for linear waves in space with Torsethaugen spectra. | |
Inverse of the Gamma distribution function | |
Inverse of the Generalized Gamma distribution function |
001 function f = wgampdf(x,a,b); 002 %WGAMPDF Gamma probability density function 003 % 004 % CALL: f = wgampdf(x,a,b); 005 % 006 % f = density function evaluated at x 007 % a = parameter 008 % b = parameter (default b=1) 009 % 010 % The Gamma distribution is defined by its pdf 011 % 012 % f(x)=x^(a-1)*exp(-x/b)/gamma(a)/b^a, a,b>0, x>=0. 013 % 014 % Example: 015 % x = linspace(0,7,200); 016 % p1 = wgampdf(x,1); p2 = wgampdf(x,2); 017 % plot(x,p1,x,p2) 018 % 019 % See also wggampdf 020 021 % Reference: Johnson, Kotz and Balakrishnan (1994) 022 % "Continuous Univariate Distributions, vol. 1", p. 494 ff 023 % Wiley 024 025 % Tested on; Matlab 5.3 026 % History: 027 % revised pab 24.10.2000 028 % - added comnsize, nargchk 029 % - replaced code with a call to wggampdf -> maintainance easier. 030 % added ms 26.06.2000 031 % added b parameter ms 23.08.2000 032 033 error(nargchk(2,3,nargin)) 034 035 if nargin<3|isempty(b), b=1; end 036 037 [errorcode x a b c] = comnsize(x,a,b,1); 038 039 if errorcode > 0 040 error('x, a and b must be of common size or scalar.'); 041 end 042 f = wggampdf(x,a,b,c); 043 044 045 046
Comments or corrections to the WAFO group