http://www.perlmonks.org?node_id=624802


in reply to How to shift the columns of a PDL matrix

Hi Anonymous Monk,

you could use something like:

$pdl = append(zeroes(1,$pdl->getdim(1)), $pdl(0:-2,:));

where $pdl is your 8 columns by 120 rows piddle

Note: I am assuming you are using PDL::NiceSlice

Cheers,

lin0