Vectorized logistic regression in matlab/octave