You are here: Symbol Reference > SignalUtils Namespace > Functions > SignalUtils.BlackmanExact Function
DSP Master VCL
ContentsIndex
PreviousUpNext
SignalUtils.BlackmanExact Function

Exact blackman window.

Pascal
function BlackmanExact(const Src: TVec; WindowMode: TSignalWindowMode): TVec; overload;

Applies exact Blackman window 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. 

w[n] := 0.42659071 - 0.49656062*cos(2*Pi*n/(n-1)) + 0.07684867*cos(4*Pi*n/(n-1)) 

0 <= n <= M - 1

Reduce spectral leakage of the FFT by first applying exact Blackman window to the the signal. 

 

uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee;

procedure TForm1.Button1Click(Sender: TObject);
var h,h1,Response,Response1: Vector;
begin
    h := Sin(Ramp(256,mvDouble,0,2*Pi*0.1));
    h1.Copy(h);
    BlackmanExact(H,wmSymmetric);  //window the sine
    Drawit(h);

    h := h*2.344168; //scale the signal to compensate for energy loss
    FrequencyResponse(h,nil,Response,8);
    FrequencyResponse(h1,nil,Response1,8);
    DrawIt([Response1,Response],['Rectangular window','Exact blackman']);
end;

 

#include "MtxExpr.hpp"
#include "MtxVecEdit.hpp"
#include "MtxVecTee.hpp"
#include "SignalUtils.hpp"

void __fastcall TForm41::BitBtn1Click(TObject *Sender)
{
    sVector h,h1, Response,Response1, FreqFr;

    h = Sin(Ramp(256,mvDouble,0,2*PI*0.1));
    h1 = h;
    BlackmanExact(h,wmSymmetric);  //window the sine
    DrawIt(h);

    h = h*2.344168; //scale the signal to compensate for energy loss
    FrequencyResponse(h,NULL,Response,8);
    FrequencyResponse(h1,NULL,Response1,8);
    DrawIt(OPENARRAY(TVec*, (Response,Response1)),OPENARRAY(AnsiString, ("Rectangular window","Exact blackman")));
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!