Least Squares with Errors

Continuing the discussion from Optimization functions in Scilab: