From help-request at octave dot org Tue Feb 28 14:31:04 2006 Subject: Re: Problems with FFT and IFFT From: Quentin Spencer To: Joe Koski CC: Octave Help Date: Tue, 28 Feb 2006 14:24:40 -0600 Joe Koski wrote: >on 2/28/06 12:27 PM, John W. Eaton at jwe at bevo dot che dot wisc dot edu wrote: > > > >>On 28-Feb-2006, Sascha Berkenkamp wrote: >> >>| Must I set all values smaller than eps to zeros? >> >>You can do that if you think it is appropriate for your application. >>I see no way that Octave can determine whether it is reasonable to do >>that for you. >> >>jwe >> >> >> > >A related question: > >Code efficiency-wise, would it be quicker to just x2=abs(x2), rather than >searching through eps values? The error introduced would probably be small. >Is there a quick vector way of setting all values less than eps to zero, >rather than searching the vector with a for loop? > > Something like this: octave:1> a=1:4; octave:2> a(a<=2)=0; octave:3> a a = 0 0 3 4 -Quentin ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------