FREQTYPE returns the frequency type of a Spectral density struct. CALL: ftype = freqtype(S) ftype = 'f' if frequency is given in Hz 'w' if frequency is given in rad/s 'k' if a wave number spectrum is given S = spectral density struct See also datastructures
Get structure field names. | |
Convert string to lowercase. | |
Compare strings. | |
Display warning message; disable or enable warning messages. |
Scale spectral density so that the moments equals m0,m2. | |
Computes covariance function and its derivatives | |
Computes covariance function and its derivatives, alternative version | |
Computes sampling interval from Nyquist frequency in spectrum | |
Separates the linear component of the Spectrum | |
Calculates joint density of Maximum, minimum and period. | |
Simulates a Randomized 2nd order non-linear wave X(t) | |
Simulates a Gaussian process and its derivative from spectrum | |
Interpolation and zero-padding of spectrum | |
Plot a spectral density |
01 function ftype=freqtype(S) 02 % FREQTYPE returns the frequency type of a Spectral density struct. 03 % 04 % CALL: ftype = freqtype(S) 05 % 06 % ftype = 'f' if frequency is given in Hz 07 % 'w' if frequency is given in rad/s 08 % 'k' if a wave number spectrum is given 09 % S = spectral density struct 10 % 11 % See also datastructures 12 13 % History: 14 % revised pab 17.02.2000 15 % - updated header 16 % revised pab 24.01.2000 17 % - added check if field exist 18 % by pab 19 20 names=fieldnames(S); 21 ind=find(strcmp(names,'f')+strcmp(names,'w')+strcmp(names,'k')); %options are 'f' and 'w' and 'k' 22 if isempty(ind) 23 warning('This is not a spectral density structure') 24 ftype=[]; 25 else 26 ftype=lower(names{ind}); 27 end
Comments or corrections to the WAFO group