Question: Matlab script Make a function Function [x] = mycubicroot(x,error) gr is Hal. a first esti- x2 is ley's method. The solution process starts by choosing
gr is Hal. a first esti- x2 is ley's method. The solution process starts by choosing a value x, as mate of the solution. Using this value, a second, more accurate value calculated with r+2P)/(2x+P), which is then used for calculatin third, still more accurate value x3, and so on. The general equation fo ing the value of xi +1 from the value of x, is xm=x(X,3+2P) / (2x +P) Write a MATLAB program that calculates the cubic root of a number. In the program use xi = P for the first estimate of the solution. Then, by using the 32. One numerical method for calculating the cubic root of a number, ation for calculat general equation in a loop, calculate new, more accurate values.Stop the looping when the estimated relative error E, defined by E--iti- s smaller than 0.00001. Use the program to calculate: (a) /800 xi (b) 259071 (c) -31.55
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
