imat_fn/cbred


Purpose

Compute constant band reduction of the supplied imat_fn.

Syntax

g=cbred(f)
g=cbred(f,1.1)
g=cbred(f,1.1,'silent','min')
g=cbred(f,1.1,'silent','min','nearest')

Description

CBRED computes a constant band reduction of the supplied imat_fn. If all of the input functions are the same size and abscissa increment, CBRED works much more quickly. You may pass in an optional scalar specifying the size (in abscissa units) for each constant band block. If the block size is not supplied, CBRED will attempt to determine it by using the maximum amplitude of an FFT of the function. Note that this only works for a time history imat_fn. Passing in an optional string 'nearest' tells CBRED to use the closest integer multiple of dT in the reduction. This allows CBRED to use the faster reduction method.

Passing in a string containing 'max', 'min', or 'mean' specifies the reduction method to use. The default reduction method is 'max'. Passing in the string 'silent' will suppress output during the calculations.

Examples

>> f=imat_fn(1);
>> f.abscissamin=0;
>> f.abscissainc=1/100;
>> f.ordinate=sin(2*pi*(0:999)/10);

>> fr=cbred(f)
Automatically computing constant band using fft
Computed a band frequency of 10.000000 Hz (dT=0.100000 sec)
Computing MAX reduction
Samples per band = 10

fr =

IMAT Function with the following attributes:

Record Name                 FunctionType     AbscissaSpacing  NumberElements
--------------------------- ---------------- ---------------- ----------------
1_(1X+,1X+)                 Time Response    Even             100

>> fr=cbred(f,1.2,'nearest','mean')
Computing MEAN reduction
Samples per band = 120

fr =

IMAT Function with the following attributes:

Record Name                 FunctionType     AbscissaSpacing  NumberElements
--------------------------- ---------------- ---------------- ----------------
1_(1X+,1X+)                 Time Response    Even             9

See Also

imat_fn/octaven