SampleApp.MainForm.button2_Click C# (CSharp) Method

button2_Click() private method

private button2_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void button2_Click(object sender, EventArgs e)
        {
            // Create a matrix from the source data table
            double[,] sourceMatrix = (dgvAnalysisSource.DataSource as DataTable).ToMatrix(out columnNames);

            // Get the input values (the two first columns)
            double[,] inputs = sourceMatrix.GetColumns(0, 1);

            numSigma.Value = (decimal)Gaussian.Estimate(inputs.ToArray()).Sigma;
        }
MainForm