Question

need a matlab script to show this

1. Apply the bisection routine bisect to find the root of the function f(x)= -1.1 starting from the interval [0,21 (that is,

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE

clc;
clear all;
count=0;
format long
a=0;
b=2;
while abs(a-b)>10^(-8)
f=inline('sqrt(x)-1.1');
c=(a+b)/2;
count=count+1;
if f(a)*f(c)<0
b=c;
elseif f(b)*f(c)<0
a=c;
else
disp('root of the function is ');
c
iterations=count
return
end
end
disp('root of the function is ');
c
iterations=count

ANSWERS

root of the function is

c =

1.210000000894070


iterations =

28

Add a comment
Know the answer?
Add Answer to:
need a matlab script to show this 1. Apply the bisection routine bisect to find the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • i need the answer to be on a MatLab window 1. Consider the following equation, which...

    i need the answer to be on a MatLab window 1. Consider the following equation, which represents the concentration (c, in mg/ml) of a drug in the bloodstream over time (t, in seconds). Assume we are interested in a concentration of c2 mg/ml C3te-0.4t A. Estimate the times at which the concentration is 2 mg/ml using a graphical method Be sure to show your plot(s). Hint: There are 2 real solutions B. Use MATLAB to apply the secant method (e.g....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT