private void Button1Click(object sender, EventArgs e)
        {
            double result        = 0;
            var    numberOfSteps = Convert.ToInt32(stepFactor.SelectedItem);
            var    lowerLimit    = Convert.ToDouble(lowerLimitBox.Text);
            var    upperLimit    = Convert.ToDouble(upperLimitBox.Text);

            Cursor.Current = Cursors.WaitCursor;
            result         = SimpsonIntegrator.Integrate(F1, lowerLimit, upperLimit, numberOfSteps);
            Cursor.Current = Cursors.Default;
            resultBox.Text = result.ToString();
        }
Exemple #2
0
        public ScalarValue Function(MatrixValue y, MatrixValue x)
        {
            var integral = new SimpsonIntegrator(y);

            return(integral.Integrate(x));
        }