Numerical Analysis Matlab Use single variable method Write

Numerical Analysis

Matlab

Use single - variable method

Write a matlab code to show how do you run this algorithm Given the function ƒ(x) = sin(x) - e^x + 2 Find the minimum value in [a, b]=[-1, 3]. Starting from the leftmost end point and move toward to rightmost end point (i.e forth) with your first x = (b - a)/4 = (3 - (-1))/4 = 1 Stop the iteration when your x 0.01

Solution

For the funtion f(x)=sin(x) - e^x + 2;

with limits x1=-1

and

x2=3

the function to get minimum values between two limits is

y=fminbnd(y,x1,x2);

put the functions in sequence, might work!

Numerical Analysis Matlab Use single - variable method Write a matlab code to show how do you run this algorithm Given the function ƒ(x) = sin(x) - e^x + 2 Find

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site