SignalUtils.BandFlip Method

procedure BandFlip(const X: TVec);

Flip the frequency band.

#NameTypeDescription
1XTVec

Result: stored in self (calling object)

Remarks:

Flip the freqencies of the time domain signal stored in X, so that the DC becomes the Nyquist frequency and the Nyquist frequency becomes the DC. (mirror all frequencies around FS/4) The routine is very fast and can also be used for streaming. X.length must be even.

Examples
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit;

procedure TForm1.Button1Click(Sender: TObject);
var b,c,Response1, Response2: Vector;
begin
    b := Math387.Sin(Ramp(256, mvDouble, 0,2*Pi*6/256));
    c.Copy(b);
    BandFlip(b);
    DrawIt([c,b],['Original signal','Flipped signal']);
    FrequencyResponse(c,nil,Response1,1,True);
    FrequencyResponse(b,nil,Response2,1,True);
    DrawIt([Response1,Response2],['Spectrum: original signal','Spectrum: flipped signal']);
end;
See Also: SignalUtils.FirFilter