当前位置: 首页>>代码示例>>C#>>正文


C# IFilter.Load方法代码示例

本文整理汇总了C#中IFilter.Load方法的典型用法代码示例。如果您正苦于以下问题:C# IFilter.Load方法的具体用法?C# IFilter.Load怎么用?C# IFilter.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IFilter的用法示例。


在下文中一共展示了IFilter.Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FrequencyResponseFromQuadratureTimeDomain

 /// <summary>
 /// Sweeps across a filter in quadrature domains (sine and cosine) to find the
 /// frequency response.  Is interesting because this is a simulation of a real filter,
 /// which may be the only way to analyze a black box object that implements IFilter.
 /// </summary>
 public FrequencyResponseFromQuadratureTimeDomain(IFilter Filter,
     double startFreq, double stopFreq, double operateFreq, double runTime, int sampleRate)
 {
     samplerate = (int)sampleRate;
     numPoints = (int)(runTime * operateFreq);
     opFreq = operateFreq;
     sweep = new FrequencySweep(startFreq, stopFreq, 1 / operateFreq, numPoints);
     iFilter = (IFilter)Filter.Clone();
     qFilter = (IFilter)Filter.Clone();
     iFilter.Load(0.0);
     qFilter.Load(1.0);
 }
开发者ID:giawa,项目名称:ee2015presentation,代码行数:17,代码来源:FrequencySweep.cs

示例2: GetResponse

 /// <summary>
 /// Calculate the step response of an IFilter object using an arbitrary length.
 /// </summary>
 /// <param name="filter">The filter to use when calculating the step response.</param>
 /// <param name="length">The length of the impulse response to calculate.</param>
 /// <returns>The step response with the provided length.</returns>
 public static double[] GetResponse(IFilter filter, int length)
 {
     double[] response = new double[length];
     filter.Load(0);
     response[0] = filter.GetOutput(1);
     for (int i = 1; i < length; i++)
         response[i] = filter.GetOutput(1);
     return response;
 }
开发者ID:giawa,项目名称:ee2015presentation,代码行数:15,代码来源:FrequencySweep.cs


注:本文中的IFilter.Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。