Download covsrt.eso

Back to the list

   1 : C COVSRT    SOURCE    PV        08/09/11    21:15:27     6150           
   2 :       subroutine covsrt(covar,ncvm,ma)
   3 : c
   4 : c etant donne une matrice de covariance covar pour un jeu de mfit parmi ma
   5 : c parametres, et leur numerotation lista, reordonne ; met a zero les termes
   6 : c lies aux parametres fixes ; ncvm est la dimension de covar
   7 : c
   8 :       IMPLICIT INTEGER(I-N)
   9 :       IMPLICIT REAL*8 (A-H,O-Z)
  10 :       real*8 covar(ncvm,ncvm)
  11 : 
  12 : * met a zero les termes sous la diagonale
  13 :       do 12 j=1,ma-1
  14 :          do 11 i = j+1,ma
  15 :             covar(i,j) = 0.
  16 :  11      continue
  17 :  12   continue
  18 : 
  19 :       do 14 i=1,ma-1
  20 :          do 13 j = i+1,ma
  21 :             if(j.gt.i) then
  22 :               covar(j,i)=covar(i,j)
  23 :             else
  24 :               covar(i,j)=covar(i,j)
  25 :             endif
  26 :  13      continue
  27 :  14   continue
  28 : 
  29 :       swap = covar(1,1)
  30 :       do 15 j=1,ma
  31 :          covar(1,j) = covar(j,j)
  32 :          covar(j,j) = 0.
  33 :  15   continue
  34 : 
  35 :       covar(1,1) = swap
  36 :       do 16 j=2,ma
  37 :         covar(j,j)=covar(1,j)
  38 :  16   continue
  39 : 
  40 :       do 18 j=2,ma
  41 :        do 17 i=1,j-1
  42 :           covar(i,j) = covar(j,i)
  43 :  17    continue
  44 :  18   continue
  45 : 
  46 :       return
  47 :       end
  48 : 
  49 :  
  50 :  
  51 :  

© Cast3M 2003 - All rights reserved.
Disclaimer