I have this code bellow
[[-r*P[1, 0] - t*P[1, 2] + P[0, 1]]]
[[-r*P[2, 0] - t*P[2, 1] + P[0, 2]]]
[[-r*P[0, 1] - t*P[0, 2] + P[1, 0]]]
[[-r*P[2, 1] - t*P[2, 0] + P[1, 2]]]
[[-r*P[0, 2] - t*P[0, 1] + P[2, 0]]]
[[-r*P[1, 2] - t*P[1, 0] + P[2, 1]]]
How do I solve this system of equations F[j,k]?
from __future__ import division import numpy as np from sympy import * t, r = symbols('t, r') A = np.matrix(input("Insert Matrix nxn: ")) n = A.shape[1] C = MatrixSymbol('P', n, n) D = np.multiply(A,C) SomP = D.sum(axis=1) F = np.multiply(A,C) for j in range(n): for k in range(n): if D[j,k]!=0: F[j,k] = D[j,k] - t*(SomP[k] - D[k,j]) - r*D[k,j] print F[j,k]and, for example, giving the matrix [[0,1,1],[1,0,1],[1,1,0]], I get this equations:
[[-r*P[1, 0] - t*P[1, 2] + P[0, 1]]]
[[-r*P[2, 0] - t*P[2, 1] + P[0, 2]]]
[[-r*P[0, 1] - t*P[0, 2] + P[1, 0]]]
[[-r*P[2, 1] - t*P[2, 0] + P[1, 2]]]
[[-r*P[0, 2] - t*P[0, 1] + P[2, 0]]]
[[-r*P[1, 2] - t*P[1, 0] + P[2, 1]]]
How do I solve this system of equations F[j,k]?