There are probably people here who can give a better answer than me. There are *certainly* people on the
PDL mailing list who can provide a better answer than I can.
As a quick stab, you could try at():
pdl> help at
Module PDL::Core
at
Returns a single value inside a piddle as perl scalar.
$z = at($piddle, @position); $z=$piddle->at(@position);
@position is a coordinate list, of size equal to the number of
dimensions in the piddle. Occasionally useful in a general context
+,
quite useful too inside PDL internals.
pdl> $x = sequence 3,4
pdl> p $x->at(1,2)
7
at converts any bad values into the string 'BAD'.
# line 3108 "Basic/Core/Core.pm.PL (i.e. PDL::Core.pm)"
pdl>
but I don't know if that's the best option.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.