Ir para conteúdo
Fórum Script Brasil

Daniel Fang

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Daniel Fang

Daniel Fang's Achievements

0

Reputação

  1. def transf_hw(cont_etapas,hw,m): for i in range(len(m)): for j in range(len(m)): if i >= cont_etapas and j >= cont_etapas: if cont_etapas == len(m)-1: m[i][j] = hw[i-cont_etapas] else: m[i][j] = hw[i-cont_etapas][j-cont_etapas] else: if i == j: m[i][j] = 1 else: m[i][j] = 0 return(m) def decomposicao_QR(matriz): R = matriz Q = [] pare = False cont_etapas = 0 while pare == False: matriz_extraida = [] print('\nRB',cont_etapas,R) hw_reduzido = householder(cont_etapas,R) print('\nRC',cont_etapas,R) print('\nhw_reduzido',cont_etapas,hw_reduzido) if cont_etapas == 0: Q = hw_reduzido elif cont_etapas >0: hw = transf_hw(cont_etapas,hw_reduzido,R) print('\nRD',cont_etapas,R) Q = multi_matriz(Q,hw) print('\nQ',cont_etapas,Q) print('\nRA',cont_etapas,R) Pessoal me deem uma ajuda por favor, não entendi por que depois da linha 'hw = transf_hw(cont_etapas,hw_reduzido,R)' a variavel 'R' mudou sendo que eu não tinha mexido nela nenhuma vez antes.
×
×
  • Criar Novo...