Polynomial data fitting using linear least-squares