DSP Master VCL
|
Computes a frequency spectrum with the autoregressive Yule-Walker method.
Computes a frequency spectrum from Data and places the result in aResult. ArOrder is the autoregressive order used by the Yule-Walker method and zero padding factor for the FFT is defined with the ZeroPadding parameter.
Estimate the frequency spectrum of sine signal with the Yule-Walker method. The assumed order is 4 and zero padding is set to 16.
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit; procedure TForm1.Button1Click(Sender: TObject); var b, Response, X: Vector; begin b := Sin(Ramp(300, mvDouble, 0,2*Pi*50/300)); ArYuleWalkerSpectrum(b,Response, 4,32); X := Ramp(Response.Length, mvDouble, 0,1/Response.Length); DrawIt(X,20*Log10(Abs(Response))); end;
#include "MtxExpr.hpp" #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" #include "SignalUtils.hpp" void __fastcall TForm1::BitBtn1Click(TObject *Sender) { sVector b, Response, X; b = Sin(Ramp(300, mvDouble, 0,2*PI*50/300)); ArYuleWalkerSpectrum(b, Response, 4,32); X = Ramp(Response.Length, mvDouble, 0,1.0/Response.Length); DrawIt(X,20*Log10(Abs(Response))); }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|