Ejemplo n.º 1
0
        public override void Fetch(ref double[,] fetchData)
        {
            double[,] data = new double[_samplesToRead, simChList.Count];
            List <double[]> Data = new List <double[]>();

            for (int i = 0; i < simChList.Count; i++)
            {
                double[] simData = new double[_samplesToRead];
                double[] noise   = new double[_samplesToRead];

                Generation.UniformWhiteNoise(ref noise, 0.03);

                if (i == 0)
                {
                    Generation.SquareWave(ref simData, 1, 50, 10);
                }
                else
                {
                    Generation.SineWave(ref simData, 1, 0, 10);
                }
                ArrayCalculation.Add(simData, noise, ref simData);
                Data.Add(simData);
            }

            for (int i = 0; i < Data.Count; i++)
            {
                ArrayManipulation.ReplaceArraySubset(Data.ElementAt(i), ref data, i, ArrayManipulation.IndexType.column);
            }


            fetchData = data;
        }
 public virtual void Add(short[] src1, short[] src2, ref short[] dest)
 {
     ArrayCalculation.Add(src1, src2, ref dest);
 }
 public virtual void Add(float[] src1, float[] src2, ref float[] dest)
 {
     ArrayCalculation.Add(src1, src2, ref dest);
 }
 public virtual void Add(double[] src1, double[] src2, ref double[] dest)
 {
     ArrayCalculation.Add(src1, src2, ref dest);
 }