[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with FFT and IFFT
From: |
Joe Koski |
Subject: |
Re: Problems with FFT and IFFT |
Date: |
Tue, 28 Feb 2006 17:00:47 -0700 |
User-agent: |
Microsoft-Entourage/11.2.1.051004 |
on 2/28/06 1:24 PM, Quentin Spencer at address@hidden wrote:
> Joe Koski wrote:
>
>> on 2/28/06 12:27 PM, John W. Eaton at address@hidden 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
>
Quentin, et al,
That's exactly the type of behavior I was looking for, e.g.
octave:4> a_true_mean = mean(a)
a_true_mean = 0.41590
octave:5> a_mean = mean(a(a <= 0.5))
a_mean = 0.14019
octave:6> ab_mean = mean(a(b<=0.5))
ab_mean = 0.30645
etc.
I had seen this used, so I knew it was in there somewhere. It is powerful,
and just what I need for a particular application. Where in the Octave
Manual or elsewhere is this construct documented? I looked but couldn't find
it. If they're not there already, I think some examples of this usage
somewhere would be useful.
Joe
-------------------------------------------------------------
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
-------------------------------------------------------------
- Problems with FFT and IFFT, Sascha Berkenkamp, 2006/02/28
- Re: Problems with FFT and IFFT, Keith Goodman, 2006/02/28
- Re: Problems with FFT and IFFT, Keith Goodman, 2006/02/28
- Re: Problems with FFT and IFFT, John W. Eaton, 2006/02/28
- Re: Problems with FFT and IFFT, Dmitri A. Sergatskov, 2006/02/28
- Re: Problems with FFT and IFFT, Sascha Berkenkamp, 2006/02/28
- Re: Problems with FFT and IFFT, John W. Eaton, 2006/02/28
- Re: Problems with FFT and IFFT, Joe Koski, 2006/02/28
- Re: Problems with FFT and IFFT, Quentin Spencer, 2006/02/28
- Re: Problems with FFT and IFFT,
Joe Koski <=
- Re: Problems with FFT and IFFT, Bill Denney, 2006/02/28
- Re: Problems with FFT and IFFT, Steve C. Thompson, 2006/02/28
- RE: Problems with FFT and IFFT, Frank Palazzolo, 2006/02/28
Re: Problems with FFT and IFFT, Joe Koski, 2006/02/28
Re: Problems with FFT and IFFT, Dmitri A. Sergatskov, 2006/02/28