If you're using matlab r2013b or later, you should use fitlm() instead of LinearModel.fit(). They have virtually the same inputs and both produce the LinearModel object. The model contains a field "Residuals" that contains (you guessed it) the residuals of the model. There is no documented second output and I haven't tried doing that myself so I'm not sure what's in the 2nd output in your code.
What are modcomes and outcomes?
