subject

Consider the function f(x) = x 2 + cos(πx) − 5. (a) matlab has a built-in function for root-finding problems called fzero. to use fzero, you first need to create a function handle which can be done with an anonymous function. if your function handle is named fun, then you can calculate the root x using the following line of code x = fzero(fun, x0); where x0 is an initial guess. use fzero and an initial guess of x0 = 5 to find the root of f(x). we will consider this to be the "exact solution" for the rest of the problem. save the exact solution in a9.dat. (b) now find the root using newton’s method. use a maximum of 50 steps, a tolerance of 10−9 , and an initial guess of x0 = 5. calculate the error by subtracting the newton’s method solution from the exact solution obtained in part (a) and then taking the absolute value. make a 1 × 2 row vector that contains the error and the number of steps of newton’s method that were performed: error number of steps . save this vector in a10.dat

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
You know the right answer?
Consider the function f(x) = x 2 + cos(πx) − 5. (a) matlab has a built-in function for root-finding...
Questions
question
History, 15.04.2020 23:13
question
Mathematics, 15.04.2020 23:13
question
Mathematics, 15.04.2020 23:13
question
Mathematics, 15.04.2020 23:13
question
Mathematics, 15.04.2020 23:13
question
Chemistry, 15.04.2020 23:13
Questions on the website: 13722361