This depends on how you would like to do the cross validation. Leave-one-out cross validation has a nice trick for linear models that can be exploited to perform the whole thing in mere seconds. If you would like to leave more out, or use a k-fold validation, you just have to retrain the model each time and calculate the cross-validation error. I am not aware of any native functions in MATLAB that does CV for linear models. My file exchange function MultiPolyRegressV3 has built in leave-one-out cross validation with the trick exploited.