# Fit Simple VAR model in Matlab

I've been trying to fit the following model in Matlab:

$\beta_{t}=a+Mt+A\beta_{t-1}+\epsilon_{t}$

Where a is a constant, M is a vector of trend parameters and A a cross-factor interaction matrix. I've been looking at vgxset but it doesn't have the option to add a trend estimation.

Any ideas? Thanks,

First of all I would not recommend the $M\cdot t$; it is fragile to the choice of $t_0$, isn't it?
Nevertheless your specification seems to be close to the one of a linear regression (if $\epsilon$ is Gaussian and you metric is the Mahalanobis' one): just organize your dataset as a nice matrix and perform a linear regression.
I suggest you to organize you explanatory variables in different matrix and then use the mvregress(...) command, that allows you to handle well the results.