In order to plot a curve a set of points is usually calculated based on some formula. The function FPLOT in MATLAB also supports plotting with some error tolerance. Its help says the following about this functionality:
The FPLOT function begins with a minimum step of size (XMAX-XMIN)*TOL. The step size is subsequently doubled whenever the relative error between the linearly predicted value and the actual function value is less than TOL.
So, if I plot a curve based on some expression and with some predefined tolerance TOL, is the error of the line segment approximation between any two calculated points always lower than TOL? Unfortunately, this is not obvious for me.
If not, how could one achieve a guaranteed (small) error of a piecewise-linear curve approximation (compared with the "exact" curve).