SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

Matrices
O aspecto mais triste da humanidade hoje
É que ela cresce mais em ciência do que em sabedoria.
Isaac Asimov
< Norma de Matriz | Operações Elementares | Atividades >

Operações em Linhas

Para resolver equações lineares, precisamos efetuar Operações em Linhas:
  • Multiplicar Linhar por constante:
    Python Listing: ../../../Code/Matrix.py.
    def Matrices_Row_Mult(A,i,a):
        for k in range( len(A[i]) ):
            A[i][k]*=a
            
    
    
  • Operação em Linhas:
    Python Listing: ../../../Code/Matrix.py.
    def Matrices_Rows_Operation(A,i,c,j):
        if (i==j): return
        
        for k in range( len(A[i]) ):
            A[i][k]+=c*A[j][k]
    
    
    
  • Trocar (swap) Linhas:
    Python Listing: ../../../Code/Matrix.py.
    def Matrices_Rows_Swap(A,i,j):
        if (i==j): return
        
        for k in range( len(A[i]) ):
            tmp=A[i][k]
            A[i][k]=A[j][k]
            A[j][k]=tmp
    
    
< Norma de Matriz | Operações Elementares | Atividades >
Messages:
0 secs.