Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import math
- import cmath
- A = np.array([
- [1, 2/3, 2, 5/2, 5/3, 5],
- [3/2, 1, 3, 10/3, 3, 9],
- [1/2, 1/3, 1, 4/3, 7/8, 5/2],
- [2/5, 3/10, 3/4, 1, 5/6, 12/5],
- [3/5, 1/3, 8/7, 6/5, 1, 3],
- [1/5, 1/9, 2/5, 5/12, 1/3, 1]
- ])
- Aw = np.array([[3], [1]])
- nA = 6
- B = np.array([[1, 0.4, 3, 7/3, 0.5, 1],
- [2.5, 1, 4/7, 5/8, 1/3, 3],
- [1/3, 1.75, 1, 0.5, 2, 0.5],
- [3/7, 1.6, 2, 1, 4, 2],
- [2, 3, 0.5, 0.25, 1, 0.5],
- [1, 1/3, 2, 0.5, 2, 1]])
- Bw = np.array([[2], [1/2], [1]])
- nB = 6
- C = np.array([
- [1, 4.25, 0.85, 1.6, 23/6, 8/3],
- [4/17, 1, 0.2, 0.4, 0.9, 2/3],
- [20/17, 5, 1, 2.1, 5.1, 10/3],
- [5/8, 2.5, 10/21, 1, 2.5, 11/6],
- [6/23, 10/9, 10/51, 0.4, 1, 19/30],
- [3/8, 1.5, 0.3, 6/11, 30/19, 1]])
- Cw = np.array([[2], [5]])
- nC = 6
- P=np.zeros((nC-2,nC-2))
- for i in range(nC-2):
- for j in range (nC-2):
- if(i!=j):
- P[i][j]=-1
- else:
- P[i][j]=nC-1
- print(P)
Add Comment
Please, Sign In to add comment