Ejemplo n.º 1
0
        internal static double GetMaxRatio(ChartValues <ObservablePoint> sincValues, ChartValues <ObservablePoint> signalValues)
        {
            ChartValues <ObservablePoint> values;

            if (sincValues.Count > signalValues.Count)
            {
                values = MathLogics.AdjustSize(signalValues, sincValues.Count);
            }
            else if (sincValues.Count < signalValues.Count)
            {
                values = MathLogics.AdjustSize(sincValues, signalValues.Count);
            }
            else
            {
                values = sincValues;
            }

            double mse = ResultLogics.GetMeanSquareError(sincValues, signalValues), numerator = values[0].Y;

            for (int i = 1; i < values.Count; i++)
            {
                if (values[i].Y > numerator)
                {
                    numerator = values[i].Y;
                }
            }

            return(Math.Round(10 * Math.Log10(numerator / mse), 4));
        }
Ejemplo n.º 2
0
 internal static double GetRootMeanSquare(ChartValues <ObservablePoint> values)
 {
     return(Math.Round(Math.Sqrt(ResultLogics.GetAveragePower(values)), 4));
 }
Ejemplo n.º 3
0
 internal static double GetVariation(ChartValues <ObservablePoint> values)
 {
     return(Math.Round(MathLogics.Sum(values, v => Math.Pow(v - ResultLogics.GetAverage(values), 2)) / values.Count, 4));
 }