pattobw has asked for the wisdom of the Perl Monks concerning the following question:
a(0) b(0,0) c(0,0) b(0,1) c(0,1) b(0,2) c(0,2) ...
a(1) b(1,0) c(1,0) b(1,1) c(1,1)....
Here is a snippet of my attempt(s):
for my $i ( 0 .. $no_energy_bins ) { my $j=0; printf PLOUT "$energy_bin[$i] $spec_cps[$i][$j] $sigma_cps[$i][$j +]%s", $j<=$y_iter_max ? " " : "\n" while $spec_cps[$i][$j++]; # # for my $j ( 0 .. $max_y_locations ) { # printf PLOUT ( "%.5f %.5e %.5f %.5e %.5f %.5e %.5f %.5e %.5f \n", # $energy_bin[$i] $spec_cps[$i][$j] $sigma_cps[$i][$j]\t; ) # } # }
Both of these attempts can from similar questions on the site.
The first attempt is commented out.
How can you specify the format for "m" number of sequences (ie %.5e %.5f)?
Thanks, Bruce
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print arrays a(i), b(i,j) c(i,j)
by GrandFather (Saint) on Feb 13, 2006 at 04:26 UTC | |
by pattobw (Novice) on Feb 13, 2006 at 17:25 UTC | |
by GrandFather (Saint) on Feb 13, 2006 at 20:20 UTC | |
|
Re: print arrays a(i), b(i,j) c(i,j)
by ayrnieu (Beadle) on Feb 13, 2006 at 04:33 UTC | |
|
Re: print arrays a(i), b(i,j) c(i,j)
by CountOrlok (Friar) on Feb 13, 2006 at 05:50 UTC | |
by GrandFather (Saint) on Feb 13, 2006 at 09:05 UTC |