Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x +...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x³ + 4x² - 10 = 0. Plot the function in the interval [0,5]. 2.Find a root of the function using x1=1. Perform the iterations of the Newton-Raphson method. Solution: 1 2 3 4 5- 6 789GAG ROOT FINDING USING NEWTON-RAPHSON METHOD 10 11 - 12- 13- 14 15 16 17 18 19 20 21 clear clc first step: plot the function x=0:0.05:4; f=@ (x) (x.^3) + (4* (x.^2)) -10; plot (x, f(x)); grid % Second step: Compute the value of x root fd=@ (x) (3* (x.^2)) + (8*x); x1=1; tol=0.0001; n = 0; while abs (f (x1)) > tol fl=f(x1); f1d=fd (x1); x2=x1-(f1/fld); f2=f(x2); x1=x2; n = n + 1; fprintf('%9.6f %13.6f %13.6f\n', n, x2, f2) end 3- Repeat steps 1 and 2 using the function of derivative in MATLAB (diff). Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x³ + 4x² - 10 = 0. Plot the function in the interval [0,5]. 2.Find a root of the function using x1=1. Perform the iterations of the Newton-Raphson method. Solution: 1 2 3 4 5- 6 789GAG ROOT FINDING USING NEWTON-RAPHSON METHOD 10 11 - 12- 13- 14 15 16 17 18 19 20 21 clear clc first step: plot the function x=0:0.05:4; f=@ (x) (x.^3) + (4* (x.^2)) -10; plot (x, f(x)); grid % Second step: Compute the value of x root fd=@ (x) (3* (x.^2)) + (8*x); x1=1; tol=0.0001; n = 0; while abs (f (x1)) > tol fl=f(x1); f1d=fd (x1); x2=x1-(f1/fld); f2=f(x2); x1=x2; n = n + 1; fprintf('%9.6f %13.6f %13.6f\n', n, x2, f2) end 3- Repeat steps 1 and 2 using the function of derivative in MATLAB (diff).
Expert Answer:
Answer rating: 100% (QA)
MATLAB CODE To plot the graph for the following newton raphson method CODING ... View the full answer
Related Book For
Posted Date:
Students also viewed these computer engineering questions
-
Problem 1. A) Determine the MARR for a company that can invest excess funds at 6% and requires 7% profit margin. B) What if, instead, the company borrows funds at 9%? a) MARR 13.00% b) MARR 16.00%
-
Use the Excel function COVARIANCE.S to compute the sample covariance between number of children and years of schooling. The sample covariance between number of children and years of schooling is ....
-
Question 2. This question uses the simple regression model to study the influence of the independent variable on the profit rate, for each research study (A, B, C). We will assess the applicability...
-
Aquarius -EAST B Capricornus Horizon Sagittarius SOUTH SUN Scorpius Libra WEST- E Description: If you could see both the Sun and the other stars during the day, this is what the sky would look like...
-
The following transactions apply to Expert Consulting for 2013, the first year of operation: 1. Recognized $70,000 of service revenue earned on account. 2. Collected $62,000 from accounts receivable....
-
What is the speed of light in a diamond that has an index of refraction of 2.4168?
-
What are the advantages to making a CCP 998 offer?
-
Charles Rubin is a 30-year employee of General Motors. Charles was pleased with recent negotiations between his employer and the United Auto Workers. Among other favorable provisions of the new...
-
Warner Company's year-end unadjusted trial balance shows accounts receivable of $118,000, allowance for doubtful accounts of $790 (credit), and sales of $470,000. Uncollectibles are estimated to be...
-
Let today be November 3, 2008. (a) Use the LIBOR rate and the swap data on November 3, 2008 in Table 11.26 and fit the LIBOR curve. (b) From the LIBOR discount curve, fit the Ho-Lee model of the...
-
1. Leslie Bright was excited when she found out that she was the successful bidder on a $1,000,000 contract with the Filbert Technology Company to provide diversity training to 6,000 employees. The...
-
How does the source of evidence affect its competence?
-
For what reasons does an auditor obtain an understanding of a client's internal control?
-
What is an attest engagement?
-
What sets public accountants apart from other professionals who might perform attestation services?
-
What information should the external auditor communicate to an audit committee each year?
-
Covid-19's s created a powerful burning platform for change in many unanticipated sectors, with many organizations struggling or simply unable to cope with the velocity of change they have...
-
The Cholesterol Level data sets give cholesterol levels of heart attack patients. Cholesterol measures are taken 2, 4, and 14 days aft er a patient has suffered a heart attack. Is there a significant...
-
Graph the curve r = cos(8/5) using the parametric graphing facility of a graphing calculator or computer. Notice that it is necessary to determine the proper domain for 0. Assuming that you start at ...
-
Sketch a plot of the vector field F = yi for (x, y) in the rectangle 1 x 2, 0 y 2. From the plot, use the marginal box that describes the interpretation of div and curl to determine whether div...
-
The population of the United States was 3.9 million in 1790 and 178 million in 1960. If the rate of growth is assumed proportional to the number present, what estimate would you give for the...
-
How does the presence of a whistle-blowing process improve quality control and independence at a public accounting firm?
-
Trish Mulcahy, a new junior in your office, says that she does not understand why she cannot work on the audit of a company that is a client of your firm and that is owned by her uncle. Trish says...
-
How do these standards differ for (1) errors, (2) frauds, (3) direct-effect illegal acts, and (4) far-removed-effect illegal acts?
Study smarter with the SolutionInn App