<?xml version="1.0" encoding="windows-1252"?>
<node id="624781" title="How to shift the columns of a PDL matrix" created="2007-07-03 16:42:42" updated="2007-07-03 12:42:42">
<type id="115">
perlquestion</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
I have a PDL that is 8 columns by 120 rows.
&lt;p&gt;
I want to simply SHIFT all the columns to the right by 1 and insert a column of 0's for the first column.  I would prefer to DROP the last column so I don't change the dimensions.
&lt;p&gt;
I think I can do it by slicing and gluing into a new PDL, but was wondering if there was any faster function that would hel me do it.  I would prefer to use "inplace" if possible to minimize memory.
&lt;p&gt;
Also, I am aware of the SHIFTRIGHT function, but that doesn't seem to be doing the job.  I believe that is a binary shift function.
&lt;p&gt;
Thanks!</field>
<field name="reputation">
9</field>
</data>
</node>
