| << | PDLCookbook | SlidingWindow >> |
Development Page--Not for Official Use
Problem
Occasionally it's useful to perform an operation on all of the elements of a piddle except those that match a certain criteria.
Solution
Use PDL's where() clause to select only those elements you wish to operate on.
Example
$p = sequence(20); $m = $p->where($p > 15 | $p < 5); $m += 5; print $p;
| << | PDLCookbook | SlidingWindow >> |