|
Import numpy as np # Numpy kutubxonasidan foydalanish coeffs1=np array
|
tarix | 08.11.2022 | ölçüsü | 42,62 Kb. | | #67925 |
| chiziqli tenglamalar sistemasi
detA=
import numpy as np # Numpy kutubxonasidan foydalanish
coeffs1=np.array([[1,2,-1],[2,5,-6],[3,8,-10]])
depvars1=np.array([3,1,1])
solution1 = np.linalg.solve(coeffs1, depvars1) #chiziqli tenglamani yechish
solution1
np.allclose(np.dot(coeffs, solution), depvars) #Natijani to'g'riligini tekshirish
Dostları ilə paylaş: |
|
|