1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ser-zykov [4K]
3 years ago
8

Find the root using bisection method with initials 1 and 2 for function 0.005(e^(2x))cos(x) in matlab and error 1e-10?

Computers and Technology
1 answer:
frutty [35]3 years ago
5 0

Answer:

The root is:

c=1.5708

Explanation:

Use this script in Matlab:

-------------------------------------------------------------------------------------

function  [c, err, yc] = bisect (f, a, b, delta)

% f the function introduce as n anonymous function

%       - a y b are the initial and the final value respectively

%       - delta is the tolerance or error.

%           - c is the root

%       - yc = f(c)

%        - err is the stimated error for  c

ya = feval(f, a);

yb = feval(f, b);

if  ya*yb > 0, return, end

max1 = 1 + round((log(b-a) - log(delta)) / log(2));

for  k = 1:max1

c = (a + b) / 2;

yc = feval(f, c);

if  yc == 0

 a = c;

 b = c;

elseif  yb*yc > 0

 b = c;

 yb = yc;

else

 a = c;

 ya = yc;

end

if  b-a < delta, break, end

end

c = (a + b) / 2;

err = abs(b - a);

yc = feval(f, c);

-------------------------------------------------------------------------------------

Enter the function in matlab like this:

f= @(x) 0.005*(exp(2*x)*cos(x))

You should get this result:

f =

 function_handle with value:

   @(x)0.005*(exp(2*x)*cos(x))

Now run the code like this:

[c, err, yc] = bisect (f, 1, 2, 1e-10)

You should get this result:

c =

   1.5708

err =

  5.8208e-11

yc =

 -3.0708e-12

In addition, you can use the plot function to verify your results:

fplot(f,[1,2])

grid on

You might be interested in
In a spreadsheet, there are many features that help you edit quickly. True False
9966 [12]

Answer:

True

Explanation:

There are many form a quick editing

i hoped this helped

;)

7 0
3 years ago
How does a paper prototype minimize constraints when compared to a digital one
aksik [14]

A regular prototype minimizes constraints if compared to a paper one because possible problems in use can be identified easily.

<h3>What is a prototype?</h3>

This refers to the initial model of a product designed to test the features of the model before it is released to the market.

<h3>What are the differences between digital and paper prototypes?</h3>

Online protoypes are often time-saving, however, because some features of the prototype cannot be tested, a regular protoype is much better to identify possible problems in design or use.

Learn more about prototipes in: brainly.com/question/4622383

#SPJ1

6 0
2 years ago
Without a/an ________. a computer is useless
Len [333]
Without a/an Operating system. a computer is useless
3 0
3 years ago
Choose the term that completes the sentence.
klio [65]

Answer: BUBBLE SORT

I hope I've been helpful to you.

6 0
3 years ago
Read 2 more answers
Two floating point numbers, A and B, are passed to a recursive subroutine.
Mnenie [13.5K]
The answer is (c) infinite loop
6 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • Monica is teaching herself to paint. What web resource would be the most helpful
    14·1 answer
  • Please refer to the MIPS solution in the question above. How many total instructions are executed during the running of this cod
    10·2 answers
  • What is top down design? a. Top down design is a way of designing your program by starting with the biggest problem and breaking
    7·1 answer
  • An information system includes _____, which are programs that handle the input, manage the processing logic, and provide the req
    14·1 answer
  • Draw a dfd that shows how data will be stored, processed, and transformed in the tims system
    9·1 answer
  • 4. In Drag and Drop method of Excel , to copy the data , you need to press __________ key while dragging the cells.
    7·1 answer
  • Suppose you have a string matching algorithm that can take in (linear)strings S and T and determine if S is a substring (contigu
    11·2 answers
  • What is the benefit of hosting a website on a personali
    6·1 answer
  • If a password is entered wrongly three times the computer will
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!