Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double a = System::Convert::ToDouble(this->textBox3->Text);
- double b = System::Convert::ToDouble(this->textBox4->Text);
- double eps = (System::Convert::ToDouble(this->trackBar1->Value))*0.0001;
- double x = System::Convert::ToDouble(this->textBox5->Text);
- int n = 2;
- double step;
- double x1 = a, x2, x3, Fy,F1y;
- do
- {
- step = (b-a)/n;
- x2 = a + step;
- x3 = x2 + step;
- Fy = (y(x2) - y(x1))/(x2 - x1);
- F1y = (y(x3) - y(x2))/(x3 - x2);
- }
- while(fabs((F1y - Fy)) > eps);
- double dif = (y(x + step) - y(x))/((x+step) - x);
- this->label13->Text = System::Convert::ToString(dif);
Add Comment
Please, Sign In to add comment