Question: Write a MATLAB script to find one root of the following equation between 0 and 1 , with a maximum number of 1 0 0
Write a MATLAB script to find one root of the following equation between and with a maximum number of steps and a tolerance of
For information about using the NewtonRaphson Method, reffer to slides of Module
Script
Here, write your script for the problem statemenet above. Your script MUST be properly and completely commented to receive full credit.
Define variables and functions as instructed below.
The anonymous functions for and must be named: and respectively.
The anonymous fuynctions for and must be named: and respectively.
Store the initial solution in an array variable named inix
The variable for the maximum number of iterations must be called maxitr.
Use a variable called iter to count your iterations inside the loop.
Use a variable called Tol to determine the tolerance for the calculations.
Define a variable called Cnv to check if your calculations are converging inside the loop.
After the solution is completed, print out the root using the fprintf command in the following format:
Root: tabnext line
Note that MATLAB is casesensitive Variables MUST be defined as instructed above, or points will be deducted.
For this exercise, you need a whileloop only.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
