DATASTRUCTURES of spectrum, covariance function and density (pdf) in WAFO To represent spectra, covariance functions and probability density functions in WAFO, the MATLAB datatype 'structured array' is used. Here follows a list of the fields in the struct representing S, cvf and pdf, respectively. Spectrum structure ~~~~~~~~~~~~~~~~~~ Requisite fields: .type String: 'freq', 'dir', 'k2d', k1d', 'encdir' or 'enc'. .S Spectrum values (size=[nf 1] or [np nf]). .w OR .f OR .k Frequency/wave number lag, length nf. .tr Transformation function (default [] (none)). .h Water depth (default inf). .norm Normalization flag, Logical 1 if S is normalized, 0 if not .note Memorandum string. .date Date and time of creation or change. Type-specific fields: .k2 Second dim. wave number lag, if .type='k2d' or 'rotk2d', length np. .theta Angular lags, if .type='dir', 'rotdir' or 'encdir', length np. .v Ship speed, if .type = 'enc' or 'encdir'. .phi angle of rotation of the coordinate system (counter-clocwise) e.g. azymuth of a ship. See also createspec, wspecplot Covariance function (cvf) structure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .R Covariance function values. Size [ny nx nt], all singleton dim. removed. .x Lag of first space dimension, length nx. .y Lag of second space dimension, length ny. .t Time lag, length nt. .h Water depth. .tr Transformation function. .type 'enc', 'rot' or 'none'. .v Ship speed, if .type='enc' .phi Rotation of coordinate system, e.g. direction of ship .norm Normalization flag, Logical 1 if autocorrelation, 0 if covariance. .Rx ... .Rtttt Obvious derivatives of .R. .note Memorandum string. .date Date and time of creation or change. See also createcov, spec2cov, cov2spec, covplot Probability density function (pdf) structure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Describing a density of n variables: .f Probability density function values (n-dimensional matrix) .x Cell array of vectors defining grid for variables (n cells) .labx Cell array of label strings for the variables (n cells) .title Title string .note Memorandum string. See also createpdf, pdfplot
of spectrum, covariance function and density (pdf) in WAFO |
of spectrum, covariance function and density (pdf) in WAFO |
001 %DATASTRUCTURES of spectrum, covariance function and density (pdf) in WAFO 002 % 003 % To represent spectra, covariance functions and probability density functions 004 % in WAFO, the MATLAB datatype 'structured array' is used. Here follows a list 005 % of the fields in the struct representing S, cvf and pdf, respectively. 006 % 007 % Spectrum structure 008 % ~~~~~~~~~~~~~~~~~~ 009 % Requisite fields: 010 % .type String: 'freq', 'dir', 'k2d', k1d', 'encdir' or 'enc'. 011 % .S Spectrum values (size=[nf 1] or [np nf]). 012 % .w OR .f OR .k Frequency/wave number lag, length nf. 013 % .tr Transformation function (default [] (none)). 014 % .h Water depth (default inf). 015 % .norm Normalization flag, Logical 1 if S is normalized, 0 if not 016 % .note Memorandum string. 017 % .date Date and time of creation or change. 018 % Type-specific fields: 019 % .k2 Second dim. wave number lag, if .type='k2d' or 'rotk2d', length np. 020 % .theta Angular lags, if .type='dir', 'rotdir' or 'encdir', length np. 021 % .v Ship speed, if .type = 'enc' or 'encdir'. 022 % .phi angle of rotation of the coordinate system 023 % (counter-clocwise) e.g. azymuth of a ship. 024 % 025 % See also createspec, wspecplot 026 % 027 % Covariance function (cvf) structure 028 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 029 % .R Covariance function values. Size [ny nx nt], all singleton dim. removed. 030 % .x Lag of first space dimension, length nx. 031 % .y Lag of second space dimension, length ny. 032 % .t Time lag, length nt. 033 % .h Water depth. 034 % .tr Transformation function. 035 % .type 'enc', 'rot' or 'none'. 036 % .v Ship speed, if .type='enc' 037 % .phi Rotation of coordinate system, e.g. direction of ship 038 % .norm Normalization flag, Logical 1 if autocorrelation, 0 if covariance. 039 % .Rx ... .Rtttt Obvious derivatives of .R. 040 % .note Memorandum string. 041 % .date Date and time of creation or change. 042 % 043 % See also createcov, spec2cov, cov2spec, covplot 044 % 045 % Probability density function (pdf) structure 046 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 047 % Describing a density of n variables: 048 % .f Probability density function values (n-dimensional matrix) 049 % .x Cell array of vectors defining grid for variables (n cells) 050 % .labx Cell array of label strings for the variables (n cells) 051 % .title Title string 052 % .note Memorandum string. 053 % 054 % See also createpdf, pdfplot 055 056 % History: 057 % revised by IR 03.04.2001 058 % revised pab 21.01.2000 059 % - spellchecked the file 060 % - added norm to spec 061 % - changed reference to specplot to wspecplot 062 % revised by es 20.10.1999 (cell arrays in pdf-struct) 063 % by es 13.10.1999 064 more on 065 help datastructures 066 more off 067 068
Comments or corrections to the WAFO group