Write a NumPy program to compute the condition number of a given matrix
- برمجة بايثون
- 2021-09-13
- mhanasmh00489829403
الأجوبة
import numpy as np
from numpy import linalg as LA
a = np.array([[1, 0, -1], [0, 1, 0], [1, 0, 1]])
print("Original matrix:")
print(a)
print("The condition number of the said matrix:")
print(LA.cond(a))
Sample Output:
Original matrix: [[ 1 0 -1] [ 0 1 0] [ 1 0 1]] The condition number of the said matrix: 1.41421356237
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال