The simplest linear fit with GLM

FWIW, the following are 2 shorter ways for converting an input vector to lm() into a matrix:

reshape(x,:,1)
view(x,:,:)
1 Like