Build model outside of cvx

I think @jackfsuia meant to specifically link this thread How to vectorize most constraint loops in CVX .