Posts by FILIPE4OLIVEIRA • 1 point
1 post
-
0
votes1
answer231
viewsA: How to create a tridiagonal matrix in Python?
# elementos da diagonal da matriz for i in range(N): for j in range(N): if (i == j): A[i][j] = 2 # elementos fora da diagonal da matriz for i in range(N): for j…