From b26f811c68a8425ae274bba11b8a437633b76f96 Mon Sep 17 00:00:00 2001 From: arthurits Date: Thu, 10 Nov 2022 11:13:05 +0100 Subject: [PATCH] Update fractal distribution plot gaussian curve --- SignalAnalysis/UpdatePlots.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SignalAnalysis/UpdatePlots.cs b/SignalAnalysis/UpdatePlots.cs index 4bd3a86..c032880 100644 --- a/SignalAnalysis/UpdatePlots.cs +++ b/SignalAnalysis/UpdatePlots.cs @@ -96,13 +96,13 @@ private void UpdateFractalDistribution(double mean, double variance) { Random rand = new(0); double std = Math.Sqrt(variance); - double[] values = ScottPlot.DataGen.RandomNormal(rand, pointCount: 1000, mean: mean, stdDev: std); - for (int i = 0; i < values.Length; i++) - values[i] = SampleGaussian(rand, mean, std); + //double[] values = ScottPlot.DataGen.RandomNormal(rand, pointCount: 1000, mean: mean, stdDev: std); + //for (int i = 0; i < values.Length; i++) + // values[i] = SampleGaussian(rand, mean, std); // create a Population object from the data - var pop = new ScottPlot.Statistics.Population(values); - //var pop = new ScottPlot.Statistics.Population(rand, pointCount: 1000, mean: mean, stdDev: std); + //var pop = new ScottPlot.Statistics.Population(values); + var pop = new ScottPlot.Statistics.Population(rand, pointCount: 1000, mean: mean, stdDev: std); //(double[] counts, double[] binEdges) = ScottPlot.Statistics.Common.Histogram(values, min: mean - 3 * std, max: mean + 3 * std, binSize: pop.span/100); //double[] curveXs = binEdges;