21 Mar 2010 10:30 UTC 2010080+1030 UTC

Edit?

Revisions?

Recent Changes?

AllRecentChanges

Search


<< | 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 >>

Edit?

Revisions?

Recent Changes?

AllRecentChanges

Search

Page last modified on September 29, 2005, at 09:28 PM