SignalUtils.Bartlett Method

function Bartlett(const Src: TVec): TVec;

Bartlett window.

#NameTypeDescription
1SrcTVec

Returns: TVec

Remarks:

Applies Bartlett window to Src vector. Window functions are applied to the signal prior to conversion to frequency domain with the FFT algorithm, to reduce the spectral leakage. Their side-effect is a lower frequency resolution. Bartlett window is a "triangular" window defined as [1] p. 248: w[n] = 2n/(M-1), 0 <= n <= (M-1)/2 w[n] = 2 - 2n/(M-1), (M-1)/2 <= n <= M-1 w[n] = 0 for other n References:

[1] Digital signal processing, Vinay K. Ingle and John G. Proakis, Brooks-Cole, 2000.

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

procedure TForm1.Button1Click(Sender: TObject);
var h,Response,FreqFr: Vector;
begin
    h.Size(100);
    FirImpulse(h,[40],0,ftLowpass,wtRectangular,1,200);
    Bartlett(H);  //window the sinc impulse response
    FrequencyResponse(h,nil,Response,8);
    FreqFr.Size(Response.Length);
    FreqFr.Ramp(0,200*0.5/Response.Length);
    DrawIt(FreqFr, Response);
end;
See Also: SignalUtils.Hanning, SignalUtils.Kaiser, SignalUtils.SignalWindow

Indexed: function Bartlett(const Src: TVec; Index: Integer; Len: Integer): TVec;

Bartlett window.

#NameTypeDescription
1SrcTVec
2IndexIntegerstart index
3LenIntegerelement count

Returns: TVec

Remarks:

Applies Bartlett window to Src vector from element at Index to element at Index + Len - 1.