Reproduce what MATLAB's backslash operator can do, using qr() and qr.coef().
sfaBSh(X, Y)
X
X matrix
Y
Y vector
Returns coefficients