本文整理汇总了C++中Signal::GetSignalBin方法的典型用法代码示例。如果您正苦于以下问题:C++ Signal::GetSignalBin方法的具体用法?C++ Signal::GetSignalBin怎么用?C++ Signal::GetSignalBin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Signal
的用法示例。
在下文中一共展示了Signal::GetSignalBin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Apply
void IntPoleZero::Apply(Signal& ASource)
{
AdjustSignalEnviroment(ASource);
unsigned int DelayBins = FDelay/GetSignalBinTime()+1;
for(unsigned int i=0;i<DelayBins;++i)
{
SetSignalBin(i,0);
}
double Integral1 = 0;
double Integral2 = 0;
double OutVoltage = 0;
unsigned int SignalBins=GetSignalBins();
for(unsigned int i=DelayBins;i<SignalBins;++i)
{
double Input = ASource.GetSignalBin(i);
Integral1 +=CalcPoly(FDelta1Coefficients,Input-Integral1)
-CalcPoly(FDecay1Coefficients,Integral1);
Integral2 +=CalcPoly(FDelta2Coefficients,Input-Integral2)
-CalcPoly(FDecay2Coefficients,Integral2);
OutVoltage = CalcPoly(FWeight2Coefficients,Integral2)-Integral1;
SetSignalBin(i,OutVoltage);
}
}
示例2: Apply
void LowPass::Apply(Signal& ASource)
{
AdjustSignalEnviroment(ASource);
unsigned int DelayBins = FDelay/GetSignalBinTime()+1;
for(unsigned int i=0;i<DelayBins;++i)
{
SetSignalBin(i,0);
}
unsigned int SignalBins = GetSignalBins();
double OutVoltage = 0;
for(unsigned int i=DelayBins;i<SignalBins-1;++i)
{
double Diff = ASource.GetSignalBin(i-DelayBins+1)-ASource.GetSignalBin(i-DelayBins);
OutVoltage += CalcPoly(FDiffCoefficients,Diff)
-CalcPoly(FDecayCoefficients,OutVoltage);
SetSignalBin(i,OutVoltage);
}
}