private void button3_Click(object sender, EventArgs e) { MWNumericArray theta = new MWNumericArray(1, sample_counts, sample_position); MWNumericArray U_1 = new MWNumericArray(1, sample_counts, u1); MWNumericArray U_2 = new MWNumericArray(1, sample_counts, u2); Plot_User plot = new Plot_User(); plot.Plot_Circle(U_1, U_2); MWArray[] result_1 = new Fit_Parameter.Class1().Fit_1(4, theta, U_1); MWArray[] result_2 = new Fit_Parameter.Class1().Fit_2(4, theta, U_2); // up = (MWNumericArray)new Sensor.Sensor().envelope(theta, U_1); Array a = result_1.ToArray(); Array b = result_2.ToArray(); double envelope = (double.Parse(a.GetValue(2).ToString()) + double.Parse(b.GetValue(2).ToString())) / 2; double alpha = (double.Parse(a.GetValue(3).ToString()) + double.Parse(b.GetValue(3).ToString())) / 2; textBox13.Text = a.GetValue(0).ToString(); //A_1 textBox9.Text = a.GetValue(1).ToString(); //d_1 textBox14.Text = b.GetValue(0).ToString(); //A_2 textBox10.Text = b.GetValue(1).ToString(); //d_2 textBox18.Text = envelope.ToString(); //a_0 textBox23.Text = alpha.ToString(); //alpha theta.Dispose(); U_1.Dispose(); U_2.Dispose(); }