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 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
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
Mathematics, 18.11.2020 01:00
question
Mathematics, 18.11.2020 01:00
question
Mathematics, 18.11.2020 01:00
question
Mathematics, 18.11.2020 01:00
question
Mathematics, 18.11.2020 01:00
Questions on the website: 13722362