function Blackman(const Src: TVec; alfa: Double; WindowMode: TSignalWindowMode): TVec;
Blackman window.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVec | |
| 2 | alfa | Double | scalar |
| 3 | WindowMode | TSignalWindowMode |
Returns: TVec
Remarks:
Applies Blackman window with alfa parameter to Src. 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. The window is defined as [1]:
w[n] = (1 - alpha)/2 - 0.5cos((2pi n)/(N-1)) + alpha/2cos((4pi n)/(N-1))
alfa = 0.16 (standard window) alfa = 0.25 (asymptotic optimal window for large N)
w[n] = 0.42 - 0.5*cos(2*Pi*n/(N-1)) + 0.08*cos(4*Pi*n/(N-1)) (alfa = 0.16)
0 <= n <= N - 1
References:
[1] F. J. Harris, "On the use of windows for harmonic analysis with the discrete Fourier transform", Proceedings of the IEEE 66(1), 1978.
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);
Blackman(H,0.1,wmSymmetric);
FrequencyResponse(h,nil,Response,8);
FreqFr.Size(Response.Length);
FreqFr.Ramp(0,200*0.5/Response.Length);
DrawIt(FreqFr, Response);
end;
See Also: SignalUtils.Kaiser, SignalUtils.SignalWindow
Indexed: function Blackman(const Src: TVec; alfa: Double; WindowMode: TSignalWindowMode; Index: Integer; Len: Integer): TVec;
Blackman window.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVec | |
| 2 | alfa | Double | scalar |
| 3 | WindowMode | TSignalWindowMode | |
| 4 | Index | Integer | start index |
| 5 | Len | Integer | element count |
Returns: TVec
Remarks:
Applies Blackman window to Src vector from element at [Index] to element at [Index + Len - 1].