Info

この質問は閉じられています。 編集または回答するには再度開いてください。

please run this method on your matlab program and writing correct method...to comment

1 回表示 (過去 30 日間)
masoud mansouri
masoud mansouri 2015 年 11 月 25 日
閉鎖済み: Walter Roberson 2015 年 11 月 25 日
clear all;
clc
a=input('enter fun')
f=inline(a)
x(1)=input('enter first guess: ');
x(2)=input('enter second guess: ');
n=input('enter tolerance: ');
iteration=0;
i=2;
while (abs(x(i))> n )
x(i+1)=x(i)-f(x(i))*(x(i)-x(i-1))/(f(x(i)-f(x(i-1))));
if (f(x(i+1))~=0)
i=i+1;
iteration=iteration+1
root=x(i)
break
else
root=x(i)
iteration=iteration
break
break
end
end
  3 件のコメント

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by