FUNCTION REFERENCE
differentiate
Derivatives of a fit at given points.
Derivatives of a fit at given points.
Syntax
[fx, fxx] = differentiate(cfit, x)Syntax
[fx, fy, fxx, fxy, fyy] = differentiate(sfit, x, y)Results have the shape of x. Derivatives are Richardson-extrapolated central differences of the fitted model in data units (normalization is accounted for).
Example
f = cfit(fittype('poly2'), 1, 0, 0); differentiate(f, 3) % 6Differences from MATLAB: derivatives are numerical (about 10 correct digits for first derivatives of smooth models); at interpolant breakpoints they average the neighbouring pieces.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.