|
|
| Problems? Is your data what you think it is? | |
| PerlMonks |
Re^3: Performance problem with Clone Methodby dcmertens (Scribe) |
| on Jul 27, 2011 at 12:47 UTC ( [id://917017]=note: print w/replies, xml ) | Need Help?? |
|
BrowserUK, you don't think this is actually a problem, do you? PDL is a very mature Perl extension that handles high dimensional data sets very nicely. In fact (surprise!) there's more than one way to do it. At the moment, I believe the best documentation for beginners is the Matlab or Scilab migration guides. They say that PDL::QuickStart is a better place to start, but I humbly disagree. See http://pdl.perl.org/?docs=Tutorials&title=PDL::Tutorials for the (short) list of tutorials available. To answer your specific question, suppose you have a 2x4 piddle, perhaps created with the sequence command. A snippet of your code might look like this:
If you wanted to modify the (0,3) element of the array (first column, last row), you would use NiceSlice and the .= notation like so:
A full working example would look like this:
The output looks like this:
Edit: revised the opening paragraph to be more useful Edit2: re-revised the opening paragraph to be even more useful Edit3: used code tags instead of pre tags for example code and ouput
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||