MATLAB: Grpahically find the lowest root of the function

functionroots

This is the function 7sin(x)(e^-x)-1. I've tried fzero and roots and have been unseccesful in both.

Best Answer

I find it useful to plot the function sometimes.
x=-5:.01:5;
f=@(x)7*sin(x).*exp(-x)-1;
plot(x,f(x));
fzero(f,-3);
I got an answer of -3.147728346757992, which checks as a zero to the function.
Related Question