Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to shift the columns of a PDL matrix

by lin0 (Curate)
on Jul 03, 2007 at 22:35 UTC ( #624802=note: print w/ replies, xml ) Need Help??


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


Comment on Re: How to shift the columns of a PDL matrix
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://624802]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-07-07 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls