in reply to Manipulating columns of PDL data using slice() method

The following should probably do what you want:
minimum($dataA->xchg(0,1)); maximum($dataB->xchg(0,1));
minimum() and maximum() take the minimum and maximum values over the first dimension. As you need the these values from the second dimension, you can use xchg to swap dimensions.

See also: http://pdl.sourceforge.net/PDLdocs/Ufunc.html#minimum

Your original code should also work, if you use double quotes instead of single ones:

for(my $k=0; $k<$maxColumns; $k++) { print "Min: " . min($dataA->slice("$k,:")) . "\n\n"; print "Max: " . max($dataB->slice("$k,:")) . "\n\n"; }
-L.

Replies are listed 'Best First'.
Re^2: Manipulating columns of PDL data using slice() method
by Anonymous Monk on Jul 03, 2007 at 20:00 UTC
    Thanks for the info. I ended up using maximum(transpose($dataA)) as my solution. Similar to the xchg method probably.
      $pdl->transpose is indeed a human-friendly synonym for $pdl->xchg(0,1).