open(F,">cdm(natural.gz).csv");
for($x=1;$x<=20;$x++){
    for($y=1;$y<=20;$y++){
	$a = -s "./momotxt/momo$x.txt.gz";
	$b = -s "./momotxt/momo$y.txt.gz";
	$c = -s "./momotxt/momo[$x][$y].txt.gz";
	if ( $a >= $b ){
	    $cdm=$c/($a+$b);
	}else{
	    $cdm=$c/($a+$b);
	}
	$cdm=($cdm-0.5)*2;
	printf F ("\"%6f\"",$cdm);
	if($y!=20){print F ",";}
    }
    print F "\n";
}
