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 h =
new Vector(0);
Vector x =
new Vector(0);
double FS = 2;
double Step = 1;
//interpolate by 1x
Step = 1;
SignalUtils.FractionalFirImpulse(30,h,
new double[2] {0.5,0.6},0,Step,TFilterType.ftLowpass,FS);
x =
MtxExpr.Ramp(h,0,1.0/h.Length);
MtxVecTee.DrawIt(x,h,"Interpolate by 1x",
false);
Step = 0.5;
//interpolate by 2x
SignalUtils.FractionalFirImpulse(30,h,
new double[2] {0.5,0.6},0,Step,TFilterType.ftLowpass,FS);
x =
MtxExpr.Ramp(h,0,1.0/h.Length);
MtxVecTee.DrawIt(x,h,"Interpolate by 2x",
false);
Step = 0.25;
//interpolate by 4x
SignalUtils.FractionalFirImpulse(30,h,
new double[2] {0.5,0.6},0,Step,TFilterType.ftLowpass,FS);
x =
MtxExpr.Ramp(h,0,1.0/h.Length);
MtxVecTee.DrawIt(x,h,"Interpolate by 4x",
false);
Step = 0.125;
//interpolate by 8x
SignalUtils.FractionalFirImpulse(30,h,
new double[2] {0.5,0.6},0,Step,TFilterType.ftLowpass,FS);
x =
MtxExpr.Ramp(h,0,1.0/h.Length);
MtxVecTee.DrawIt(x,h,"Interpolate by 8x",
false);
}