The ‘BINT’ matrix contains the parameter confidence intervals.
If you want both parameter and prediction confidence intervals, use fitlm:
x = (1:10)';
y = 1.5 + 2.3*x + 1.5*randn(size(x));
mdl = fitlm(x, y);
B = mdl.Coefficients.Estimate;
CI = coefCI(mdl);
[Ypred,YCI] = predict(mdl, x);
figure(1)
plot(x, y, 'pg')
hold on
plot(x, Ypred,'-r', x, YCI, '--r')
hold off
grid
Best Answer