Maybe the following works. I don't accept this answer because i'm not sure if we can use mdl.DFE.
% Define your own data vectors 'y', 't' first, and then make a table
tbl = table(y,t);
% Fit the linear model to have mdl.DFE
mdl = fitlm(tbl,'y ~ t');
% Consider the response in the middle of the interval
%[ypred,yci] = predict(mdl,t(T/2)); % instead of this, do as follows
[EstCov, se, coeff] = hac(t,y);
[ypred,yci] = mypredict(t(T/2),coeff,EstCov,mdl.DFE,0.05);
% This is a stripped down version of function 'predci' called in function
% 'predictDesign' in CompactLinearModel.m.
function [ypred,yCI] = mypredict(X,beta,Sigma,dfe,alpha)
X = [1 X];
% Compute the predicted values at the new X.
ypred = X * beta;
% confi interval for fitted curve
varpred = sum((X*Sigma) .* X,2);
% pointwise
crit = tinv(1-alpha/2,dfe);
delta = sqrt(varpred) * crit;
yCI = [ypred-delta ypred+delta];
end