THCDF Marginal wave height, Hd, CDF for Torsethaugen spectra. CALL: F = thcdf(h,Hm0,Tp) F = cdf evaluated at h. h = vector of evaluation points. Hm0 = significant wave height [m]. Tp = Spectral peak period [s]. dim = 'time' : Hd distribution in time (default) 'space' : Hd distribution in space THCDF approximates the marginal cumulative distribution of Hd, i.e., zero-downcrossing wave height, for a Gaussian process with a Torsethaugen spectral density. The empirical parameters of the model is fitted by least squares to simulated Hd data for 600 classes of Hm0 and Tp. Between 50000 and 150000 zero-downcrossing waves were simulated for each class of Hm0 and Tp. THCDF is restricted to the following range for Hm0 and Tp: 0.5 < Hm0 [m] < 12, 3.5 < Tp [s] < 20, and Hm0 < (Tp-2)*12/11. Example: Hm0 = 6;Tp = 8; h = linspace(0,4*Hm0/sqrt(2))'; F = thcdf(h,Hm0,Tp); dt = 0.4; w = linspace(0,2*pi/dt,256)'; S = torsethaugen(w,[Hm0 Tp]); xs = spec2sdat(S,20000,dt); rate=8; method=1; [S,H] = dat2steep(xs,rate,method); empdistr(H,[h, F],'g') See also thpdf
Wave height, Hd, distribution parameters for Torsethaugen spectra. | |
Wave height, Hd, distribution parameters for Torsethaugen spectra. | |
Generalized Gamma cumulative distribution function | |
Truncated Weibull cumulative distribution function | |
Display message and abort function. | |
Compare first N characters of strings ignoring case. |
001 function [f,fA,fB] = thcdf(h,Hm0,Tp,dim) 002 %THCDF Marginal wave height, Hd, CDF for Torsethaugen spectra. 003 % 004 % CALL: F = thcdf(h,Hm0,Tp) 005 % 006 % F = cdf evaluated at h. 007 % h = vector of evaluation points. 008 % Hm0 = significant wave height [m]. 009 % Tp = Spectral peak period [s]. 010 % dim = 'time' : Hd distribution in time (default) 011 % 'space' : Hd distribution in space 012 % 013 % THCDF approximates the marginal cumulative distribution of Hd, i.e., 014 % zero-downcrossing wave height, for a Gaussian process with a Torsethaugen 015 % spectral density. The empirical parameters of the model is fitted by 016 % least squares to simulated Hd data for 600 classes of Hm0 and 017 % Tp. Between 50000 and 150000 zero-downcrossing waves were simulated for 018 % each class of Hm0 and Tp. 019 % THCDF is restricted to the following range for Hm0 and Tp: 020 % 0.5 < Hm0 [m] < 12, 3.5 < Tp [s] < 20, and Hm0 < (Tp-2)*12/11. 021 % 022 % Example: 023 % Hm0 = 6;Tp = 8; 024 % h = linspace(0,4*Hm0/sqrt(2))'; 025 % F = thcdf(h,Hm0,Tp); 026 % dt = 0.4; w = linspace(0,2*pi/dt,256)'; 027 % S = torsethaugen(w,[Hm0 Tp]); 028 % xs = spec2sdat(S,20000,dt); rate=8; method=1; 029 % [S,H] = dat2steep(xs,rate,method); 030 % empdistr(H,[h, F],'g') 031 % 032 % See also thpdf 033 034 % Reference 035 % P. A. Brodtkorb (2004), 036 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 037 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 038 % Trondheim, Norway. 039 040 % History 041 % Revised pab jan2004 042 % By pab 20.12.2000 043 044 045 error(nargchk(3,4,nargin)) 046 if nargin<4|isempty(dim), 047 dim = 'time';% dim='time'->wtweibpdf, dim='space'->wggampdf 048 end 049 050 if Hm0>12| Hm0>(Tp-2)*12/11 051 disp('Warning: Hm0 is outside the valid range') 052 disp('The validity of the Hd distribution is questionable') 053 end 054 if Tp>20|Tp<3 055 disp('Warning: Tp is outside the valid range') 056 disp('The validity of the Hd distribution is questionable') 057 end 058 Hrms = Hm0/sqrt(2); 059 [a b c] = thwparfun(Hm0,Tp,dim); 060 f = wtweibcdf(h/Hrms,a,b,c); 061 return 062 063 %old call kept just in case 064 if strncmpi(dim,'t',1) 065 [a b c] = thwparfun(Hm0,Tp); 066 f = wtweibcdf(h/Hrms,a,b,c); 067 else 068 [a b c] = thgparfun(Hm0,Tp,dim); 069 f = wggamcdf(h/Hrms,a,b,c); 070 end 071 return 072 073
Comments or corrections to the WAFO group