void ArYuleWalkerSpectrum(TVec Data, TVec aResult, Int32 ArOrder, Int32 ZeroPadding)
Computes a frequency spectrum with the autoregressive Yule-Walker method.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Data | TVec | source TVec |
| 2 | aResult | TVec | source TVec |
| 3 | ArOrder | Int32 | |
| 4 | ZeroPadding | Int32 |
Result: stored in self (calling object)
Remarks:
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.
Examples
using Dew.Math;
using Dew.Math.Editors;
using Dew.Math.Units;
using Dew.Signal;
using Dew.Signal.Units;
using Dew.Math.Tee;
using Dew.Signal.Tee;
private void button1_Click(object sender, EventArgs e)
{
Vector b, X;
Vector Response = new Vector(0);
b = MtxExpr.Sin(MtxExpr.Ramp(300, TMtxFloatPrecision.mvDouble, 0, 2 * Math.PI * 50 / 300));
SignalUtils.ArYuleWalkerSpectrum(b, Response, 4, 32);
X = MtxExpr.Ramp(Response.Length, TMtxFloatPrecision.mvDouble, 0, 1.0 / Response.Length);
MtxVecTee.DrawIt(X, 20 * MtxExpr.Log10(MtxExpr.Abs(Response)),"",false);
}