To perform quadrature differentiation in MATLAB, one can follow these steps:
inline
or function_handle
. For example, let us consider the function f(x) = cos(x)
.main.m22 chars2 lines
[0, pi/2]
.main.m17 chars3 lines
main.m271 chars6 lines
h
.main.m282 chars7 lines
main.m60 chars3 lines
This will provide a plot of the original function in blue and the resulting derivative approximation in red.
gistlibby LogSnag