Working verion of N_basis linear regression
Simplified some code and eliminated one for loop
Vectorized version working