Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Importing NumPy Library
- import numpy as np
- import sys
- # Reading number of unknowns
- n = int(input('Enter number of unknowns: '))
- # Making numpy array of n x n+1 size and initializing
- # to zero for storing augmented matrix
- a = np.zeros((n,n+1))
- # Making numpy array of n size and initializing
- # to zero for storing solution vector
- x = np.zeros(n)
- # Reading augmented matrix coefficients
- print('Enter Augmented Matrix Coefficients:')
- for i in range(n):
- for j in range(n+1):
- a[i][j] = float(input( 'a['+str(i)+']['+ str(j)+']='))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement