I am looking for a "nice and easy" way to plot confidence and prediction bands around linear and exponential fit curves. My feeling says that this should be easy using the statistics and curve fitting toolboxes of MATLAB, but so far I did not find a suitable way to do this. I tried the "confint" and "predint" functions of MATLAB to plot the confidence and prediction bands respectively. The "predint" function works fine and indeed returns the prediction bounds around the fitted curve and this function seems applicable for both linear and non-linear regression (exponential fits). However, the "confint" function only returns the confidence interval of the fit coefficients, not the typical hourglass-shaped confidence bands around the actual fit curve.
Does anyone know a "simple" way to plot confidence bounds around a fit curve, in case of both linear fits and exponential fits? Is it possible to use "confint" or can I use another standard MATLAB function?