Re: Anti-Chop Function
- To: mathgroup at smc.vnet.net
- Subject: [mg5833] Re: [mg5813] Anti-Chop Function
- From: Francisco Edmundo de Andrade <edmundo at lia.ufc.br>
- Date: Tue, 28 Jan 1997 03:42:57 -0500
- Sender: owner-wri-mathgroup at wolfram.com
On Wed, 22 Jan 1997, Mathew J. Binkley wrote: > The Chop[Data, Min] sets all values in Data that are < Min equal to 0. Is > there an equivalent function that will take all values in Data that are > > Max and set them equal to 0? I'm trying to eliminate the DC components > of a Fourier transform, and the only way I've been able to do it to date > is buy manually Delete[]-ing the first value and Insert[] -ing 0. > > > Mat > --- > Mathew Jason Binkley - Astronomy TA | "It was the dawn of the Third Age > Wake Forest University - Olin 304 | of mankind, the year the Great > Phone: (910) 759-4957 | War came upon us all." > WWW: http://www.wfu.edu/~binklmj5/ | - John Sheridan, Babylon 5 > > Dear Mathew, If you define a function maxChop as follows: maxChop[v_,max_]:=If[v>max,0,v] You will get the wanted result, for example: maxChop[300,100] gives 0 and maxChop[30,100] gives 30 I hope this help you. With kindest regards, Edmundo (Edmundo's contribuitions 1997) Universidade Federal do Ceara Fortaleza - CE - Brasil