Compute the inverse complex cepstrum.
Compute inverse complex cepstrum of Src and place the result in Dst. Phase lag is the value returned by CplxCepstrum. TargetLength is the length of the original (not zero padded) signal passed to the CplxCepstrum routine.
Example 1
Forward and inverse complex cepstrum.
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit;
procedure TForm1.Button1Click(Sender: TObject);
var a,b: Vector;
k: TSample;
begin
a.SetIt(False,[1,2,3,4,3,2,-1,1]);
k := CplxCepstrum(a,b);
CplxCepstrumInv(b,a,k,a.Length);
// "a" again becomes the same as on the input a = [1,2,3,4,3,2,-1,1]
DrawIt(a);
end;
#include "MtxVecCPP.h" //MtxVecCPP.cpp must be included in the project
#include "MtxVecEdit.hpp"
#include "MtxVecTee.hpp"
#include "SignalUtils.hpp"
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
Vector a,b;
double k;
a->SetIt(False,OPENARRAY(double,(1,2,3,4,3,2,-1,1)));
k = CplxCepstrum(a,b);
CplxCepstrumInv(b,a,k,a->Length);
// "a" again becomes the same as on the input a = [1,2,3,4,3,2,-1,1]
DrawIt(a);
}
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 a = new Vector(0);
Vector b = new Vector(0);
double k;
a.SetIt(false,new double[8] {1,2,3,4,3,2,-1,1});
k = SignalUtils.CplxCepstrum(a,b,64);
SignalUtils.CplxCepstrumInv(b,a,k,a.Length);
// "a" again becomes the same as on the input a = [1,2,3,4,3,2,-1,1]
TeeChart.DrawIt(a,"Original time signal",false);
}