In the plot you will see one root is obtained from an


write a MATLAB program that does the following:

a) Plot the given function in MATLAB for x ranging from -1 to 1. Put a proper title of the plot, also label the axes appropriately.

b) Use MATLAB's roots function to obtain the six roots of the equation. Display the roots and plot them with different colors and symbols on the same chart where you plotted the function.

c) Write a MATLAB program segment that will implement the root finding algorithm by Newton-Raphson method. Newton-Raphson method needs one initial value to run each time. You program segment will be executed with different initial values that you get from d).

d) Use a loop in your program to execute the Newton-Raphson program segment for each initial value between -1 to 1 with an interval 0.1. Plot the initial values on the x-axis with the color that you used in b) to plot the root obtained from this initial value; these plots will be on the same chart. For example, if you start from 0.1 and obtain the first root that you plotted by using color red in b), then plot (0.1, 0) with color red.

e) In the plot, you will see one root is obtained from an initial value that is close to another root. Can you explain by observing the plot why that is happening.


Attachment:- Numerical-data-analysis-Assignment-.pdf

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: In the plot you will see one root is obtained from an
Reference No:- TGS0652856

Now Priced at $70 (50% Discount)

Recommended (94%)

Rated (4.6/5)