exp(-x) - sinx = 0
3 次查看(过去 30 天)
显示 更早的评论
hi, i'm planning to reach the root of this function:
exp(-x) - sinx = 0;
here is my code:
------------------------------
x0 = input('please enter x0 ::: ');
eps = input('please enter steps ::: ');
% eps is the step
iterator = 0;
for i=0:eps:x0
x=x+exp(-x) - sin(x);
iterator = iteratio + 1;
end
disp('root ::: '); disp(x);
disp('iterate count ::: '); disp(iterator);
------------------------------
well i can't make it work. can you help me with that?
0 个评论
回答(2 个)
reza
2014-1-10
6 个评论
Youssef Khmou
2014-1-11
编辑:Youssef Khmou
2014-1-11
alright, infinite number of solutions with period of ~3.1
thanks
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Programming and Mixed-Integer Linear Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!