Finally, since you are using MATLAB for this, I advice you not to use logarithms because some accuracy might be lost, there might be multicollinearity problem as noted in the comments and that should be not so hard to write a code for including all these combinations even for large $n$, at least using R.