[2022 Fall] Assignment6-3¶
Course: AP3021
In [1]:
Copied!
import numpy as np
import numpy as np
In [2]:
Copied!
a = np.array([[0, 1, 0, 0],
[0, 0, 2, 1],
[1, 1, 0, 0],
[1, 1, -1, -1]])
b = np.array([[1],[1],[4],[0]])
inverse_a = np.linalg.inv(a)
print(inverse_a.dot(b))
a = np.array([[0, 1, 0, 0],
[0, 0, 2, 1],
[1, 1, 0, 0],
[1, 1, -1, -1]])
b = np.array([[1],[1],[4],[0]])
inverse_a = np.linalg.inv(a)
print(inverse_a.dot(b))
[[ 3.] [ 1.] [-3.] [ 7.]]
Last update:
2024-04-27