p = predint(fitresult,x,0.95,'observation','off');
ci = confint(fitresult,0.95);
ciup = polyval( ci(2,:),x);
cilow = polyval(ci(1,:),x);
NO! ci ARE the confidence limits; they are bounds on the coefficients themselves, hence only an upper/lower for each of the N+1 coefficients. Remove the last two lines entirely; they're a total misuse of ci
All you can plot for them would be something like
errorbar([0 1],coeffvalues(fitresult),ci(1,:),ci(2,:),'x')
Best Answer