hi,
i dont know if this helps but do you mean that you want to estimate a conditional mean and variance model. for eg. something like this:
VarMdl = garch(1,1)
Mdl = arima('ARLags',1,'Variance',VarMdl)
EstMdl = estimate(Mdl,r);
if yes you can read it on the link:
mathworks.com/help/econ/fit-a-composite-conditional-mean-and-variance-model-to-nasdaq-returns.html
hope this helps.