Compute CSDs from the supplied time history imat_fn
gyx=csd(tref,tres,5)
gyx=csd(tref,tres,5,10)
gyx=csd(TREF,TRES,NBLK,NAVG,'silent','noprogbar')
gyx=csd(TREF,TRES,NBLK,NAVG,'overlap',OVPCT)
CSD will compute single-sided Cross Power Spectral Density functions from the supplied time histories. TREF is an imat_fn containing the reference time histories. TRES is an imat_fn containing the response time histories. All of the supplied time histories must have the same length. NBLK is a required parameter indicating the window size. If it is a scalar it indicates the block size to be used in the CSD calculation. A Hamming window will be used. If it is a vector or imat_fn, it should contain the window to be used. The length of the vector indicates the window size.
NAVG is an optional scalar specifying the number of averages to use. If you do not specify the number of averages or the overlap, the default for NAVG is the number of frames that can be used given the specified NBLK without overlapping, or 5, whichever is greater. If NAVG is specified, and OVPCT is not, CSD will automatically use overlap processing to achieve the requested number of averages.
'overlap' is an optional input that must be followed by OVPCT to specify the amount of overlap desired. OVPCT is a numeric scalar between 0 and less than 100 specifying the overlap percentage. If you specify OVPCT, but do not specify NAVG, CSD will calcalate NAVG to use as much of the time history as possible with the specified overlap.
'silent' is an optional input string that suppresses output during the CSD calculation.
'noprogbar' is an optional input string that disables the progress bar.
CSD returns an imat_fn of the same size as T containing the CSDs.
GYX is an imat_fn of size TRESxTREF containing the CSDs. The subscript Y represents the output (responses), and X represents the input (references).
>> t
t =
1x2 IMAT Function with the following attributes:
Row Col Record Name FunctionType AbscissaSpacing NumberElements
--- --- ------------------- ---------------- ---------------- ----------------
1 1 1_(,1X+) Time Response Even 159681
1 2 2_(,2X+) Time Response Even 159681
>> c=csd(t,t,8192)
...Processing time histories
-------------------------
Number of points: 155648
Block Size: 4096
Averages: 38
Overlap: 0 samples (0.00%)
Delta F: 1.0000 Hz
Spectral lines: 2049
-------------------------
CSD Processing Parameters
c =
2x2 IMAT Function with the following attributes:
Row Col Record Name FunctionType AbscissaSpacing NumberElements
--- --- ------------------- ---------------- ---------------- ----------------
1 1 1_(1X+,1X+) Auto Spectrum Even 2049
2 1 2_(1X+,2X+) Cross Spectrum Even 2049
1 2 3_(2X+,1X+) Cross Spectrum Even 2049
2 2 4_(2X+,2X+) Auto Spectrum Even 2049
>> c=csd(t,t,window(t,8192,'flattop'),50)
CSD Processing Parameters
-------------------------
Number of points: 155648
Block Size: 8192
Averages: 50
Overlap: 5100 samples (62.26%)
Delta F: 0.5000 Hz
Spectral lines: 4097
-------------------------
...Processing time histories
c =
2x2 IMAT Function with the following attributes:
Row Col Record Name FunctionType AbscissaSpacing NumberElements
--- --- ------------------- ---------------- ---------------- ----------------
1 1 1_(1X+,1X+) Auto Spectrum Even 4097
2 1 2_(1X+,2X+) Cross Spectrum Even 4097
1 2 3_(2X+,1X+) Cross Spectrum Even 4097
2 2 4_(2X+,2X+) Auto Spectrum Even 4097
>>