I have the several piddles that look like so (actually, I have seven
or eight such piddles)

$var1 = [
# day1 day2 day3 .. day365/366
 [111  121  131 ..]  # cell1
 [211  221  231 ..]  # cell2
 ..                         # a few hundred to 10s of 1000s cells
]

$var2 = [
# day1 day2 day3
 [112  122  132 ..]  # cell1
 [212  222  232 ..]  # cell2
 ..
]

I want to create the following composite piddle

$vc = [
# cell day var1 var2 .. var7
 [   1     1      111    112 ..]
 [   1     2      121    122 ..] #<<<
 [   1     3      131    132 ..]
 ..
 [   1  365  13651 13652 ..]
# end of cell1
 [   2     1      211     212 ..]
 [   2     2      221     222 ..]
 [   2     3      231     232 ..]
..
 [   2  365  23651 23652 ..]
# end of cell2
]

and then, I want to be able to get all the values for any given cell
and day combination. So, for cell = 1, day = 2, I want the row marked
with #<<< above.

1 2 121 122 ..

My hope is to do something like so

for my $cell (1 .. $ncells) {
   for my $day (1 .. $ndays) {
       do something with $cell, $day, $var1, $var2 ..
       where $var1, $var2, etc. are for the specific $cell, $day combo



-- 
Puneet Kishor

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to