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

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.