Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Numerical methodsWrite a user - defined function in MatLab that applies the Ridders interpolation method for calculating derivatives. The function should be called [ a
Numerical methodsWrite a userdefined function in MatLab that applies the Ridders interpolation method for
calculating derivatives. The function should be called
DerivativeRidders func err where a is the Romberg matrix, is the
derivatrive, func is the function defined with function handle @ is the value at which the
derivative is required, is the step and err is the error. For the derivative the function should
use the twopoint central difference scheme. If the err is not defined, the function should select
automatically er If the function should show a message must be nonzero'. The
error should be calculated as the maximum value compared with the previous two values eg
for the case of B the error should be the maxabsBA absBA see lecture slides
Use also format long in the function so that you see as many digits as possible. The size of
the Romberg matrix should be fixed to number The only buildin functions of MatLab you
are allowed to use are: nargin, feval, max, abs disp. After building the function use it to
estimate the derivative of function:
at with Report the results and submit with the MatLab files.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started