comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: "clamping" an array to a maximum value?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: "clamping" an array to a maximum value? [message #13958 is a reply to message #13951] Mon, 21 December 1998 00:00 Go to previous message
Mark Buckley is currently offline  Mark Buckley
Messages: 7
Registered: December 1998
Junior Member
dEdmundson@Bigfoot.com wrote in message <75l3vi$nit$1@nnrp1.dejanews.com>...
>
>
> It's late here in Oz and my brain refuses to find an
> easy solution to the following seemingly trivial
> problem:
>
> I have a 2d array of floats. All elements having
> a value greater than max_val I want to set equal
> to max_val. My solution is a rather complicated-
> looking use of the "where" function.



a = a < maxval

where a is the array, should do it...

cheers,

Mark
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: segmentation
Next Topic: 3D Scatter plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Apr 27 13:45:23 PDT 2026

Total time taken to generate the page: 0.63921 seconds