SLIDE 1
Numerical differentiation: Code
numerical_diff.m
1
function [approx deriv,error] = ... numerical diff(test case,x,hvals)
2
%function[approx derive,error] = ... numerical diff(test case,x,hvals)
3
%demonstrates errors and convergence rates for
4
%approximating derivatives of a function f
5
%(specified below) at x for a sequence of
6
%values of hvals
7
%PC MA428
8
.
9
.
10
.
September 3, 2019 1 / 5