a Write a MATLAB script file and create an anonymous functio
a) Write a MATLAB script file and create an anonymous function to define f(x)= -12- 21x+18x2-2.75x3. Then, plot the function and use the graphical method to locate the root(s). List your observations as a column matrix, whose first column is the x values and the second column is the y values. b) Solve the equation analytically and find the true values roots. c) Calculate your true error for each root.
Solution
Using the code,
so we get roots.
Now we have to plot the graph of the given function,
we will get grph of this
Now we have to find roots, so we can use y=f(x)
y = -12-21x+18x.^2 -2.75x.^3
you will get real zeros. Now we have to find all roots, we caN USE,
roots([-2.75 18 -21 -12])
Hope this will help you.

