improve least squares example

This commit is contained in:
jakubknczny 2021-06-01 07:48:16 +02:00
parent 1b6e700a07
commit c84e96a575

View File

@ -151,6 +151,8 @@ if __name__ == "__main__":
print(Q) print(Q)
print(R) print(R)
print('solve least squares') print('solve least squares')
print(matrix[:2, :-1])
print(matrix[:2, -1:])
print(qr.solve_least_squares(matrix[:2, :-1], matrix[:2, -1:], is_givens=True)) print(qr.solve_least_squares(matrix[:2, :-1], matrix[:2, -1:], is_givens=True))
def PolyCoefficients(x, coeffs): def PolyCoefficients(x, coeffs):