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!