COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

fast fourier transformation

• Email
• Follow

```I've opened a soundfile such that:

Now I need to find the fast fourier transform of this sound and store it in a variable K. How is this done? Is it with the fft() function? I've already found frequency difference between fast fourier transforms fo the sample:

y=2*abs(fft(A))/length(B);
y = y(1:end/2);

Is it K=y;

Any help is appreciated.
```
 0

See related articles to this posting

```On 03/12/10 5:58 PM, Raymond wrote:
> I've opened a soundfile such that:
>
>
> Now I need to find the fast fourier transform of this sound and store it
> in a variable K. How is this done?

Fast Fourier Transforms apply only to *continuous* equations, but you
only have a finite amount of data and each data item is finite length.
Possibly you are interested in the Discrete Fast Fourier Transform instead.

> Is it with the fft() function?

No, that is the Discrete Fast Fourier Transform.

> I've
> already found frequency difference between fast fourier transforms fo
> the sample:
>
> y=2*abs(fft(A))/length(B);
> y = y(1:end/2);
>
> Is it K=y;

The first term of fft(A) corresponds to cos^0(x), which corresponds to a
constant DC offset. That DC offset is not mirrored anywhere in the
output. Your y(1) would have done some computation involving that DC
component as well as the other components, and it seems likely to me
that that computation is not valid for the DC offset.

You should probably be looking at fftshift() if you want to produce the
one-sided discrete fast fourier transform.
```
 0

```thanks. just out of curiosity, what does a lawyer do with  matlab exactly : ) ?
Walter Roberson <roberson@hushmail.com> wrote in message <5qhKo.1514\$jR4.157@newsfe03.iad>...
> On 03/12/10 5:58 PM, Raymond wrote:
> > I've opened a soundfile such that:
> >
> >
> > Now I need to find the fast fourier transform of this sound and store it
> > in a variable K. How is this done?
>
> Fast Fourier Transforms apply only to *continuous* equations, but you
> only have a finite amount of data and each data item is finite length.
> Possibly you are interested in the Discrete Fast Fourier Transform instead.
>
> > Is it with the fft() function?
>
> No, that is the Discrete Fast Fourier Transform.
>
> > I've
> > already found frequency difference between fast fourier transforms fo
> > the sample:
> >
> > y=2*abs(fft(A))/length(B);
> > y = y(1:end/2);
> >
> > Is it K=y;
>
> The first term of fft(A) corresponds to cos^0(x), which corresponds to a
> constant DC offset. That DC offset is not mirrored anywhere in the
> output. Your y(1) would have done some computation involving that DC
> component as well as the other components, and it seems likely to me
> that that computation is not valid for the DC offset.
>
> You should probably be looking at fftshift() if you want to produce the
> one-sided discrete fast fourier transform.
```
 0

```On 03/12/10 8:41 PM, Raymond wrote:
> thanks. just out of curiosity, what does a lawyer do with matlab exactly
> : )

Chasing individual ambulances is inefficient when one can use matlab to
predict where the ambulances will most likely be.
```
 0

```On Dec 3, 6:58=A0pm, "Raymond " <atlantaswagsurfe...@yahoo.com> wrote:
> I've opened a soundfile such that:
>
>
> Now I need to find the fast fourier transform of this sound and store it =
in a variable K. How is this done? Is it with the fft() function? I've alre=
ady found frequency difference between fast fourier transforms fo the sampl=
e:
>
> y=3D2*abs(fft(A))/length(B);

length(A) =3D lemgth(B) ?
The DC and Nyquist frequency terms should not be doubled

> y =3D y(1:end/2);
> Is it K=3Dy;

Only if length(A) is an even number
This excludes the Nyquist frequency component.
Do you want to keep the DC level y(1)?

Hope this helps.

Greg
```
 0

4 Replies
238 Views

Similar Articles

12/15/2013 11:45:28 AM
page loaded in 28560 ms. (0)

Similar Artilces:

How to implement Fast Fourier Transform?
Does anyone know how to solve the problem on using Fast Fourier Transform (FFT) to divide a noise wave into different Sine Wave? Thank you Eric start by reading this book: <http://www.dspguide.com/> It's free. Good implementation explanation is at : <http://www.eptools.com/tn/T0001/INDEX.HTM> Eliezer Eric wrote: > > > Does anyone know how to solve the problem on using Fast Fourier > Transform (FFT) to divide a noise wave into different Sine Wave? > Thank you > Eric ...

Fast fourier transform #3
Plz tell me why do I get the mirror image about the half of the sampling frequency in the periodigram while doing the fast fourier transform in matlab using the fft function That is, because of the way how fft is computed using complex exponentials. On Apr 26, 9:16 am, Kamrul Hasan <faysal_002...@yahoo.com> wrote: > Plz tell me why do I get the mirror image about the half of the > sampling frequency in the periodigram while doing the fast fourier > transform in matlab using the fft function The mirror image you see is just the periodic repeat of the negative part of t...

Fast Fourier Transform of data
Hi, I would like to perform a fast fourier transform of my measurement data. I used the script below, but I doubt if it is correct. The plot is not what I expected: I was expecting to see a big disturbance of the electric power at 50 Hz (due to a nearby machine), but I see the big disturbance at 100 Hz, 200 Hz and 300 Hz. Therefore I assume that something in my script is not correct. Could anyone tell me what it is? Or is it correct? Thanks for reply! Ruben % 'a' is data row 1:40496 a=data(1:40496); % fast fourier transform of data b=abs(fft(a)); % calculate length o...

Fast Fourier Transform fft2
There seems to be something wrong with the fft2 function on matlab. This is a simpler file of what im trying to do. It doesn't work properly when the fft2 function is added in. Can anyone see why? Does anyone have another fast Fourier Transform file? C=complex(rand(128),rand(128)); F=real(fft2(C)); max=100; NewF=ones(128); for x=1:128 for y=1:128 r=sqrt(x.^2 + y.^2); if r>max NewF(x,y)=0; end if r<=max NewF(x,y)=F(x,y); end end end imagesc((abs(NewF).^2)) "Freda " <fredawerdiger@hotmail.com>...

Looking for Fast Fourier Transform Paper
By Cooley and Tukey, 1965. Anyone know if it can be downloaded. I searched for about 30 minutes and couldn't find it. John Atwood wrote: > Jim Stewart <jstewart@jkmicro.com> wrote: > >>By Cooley and Tukey, 1965. >> >>Anyone know if it can be downloaded. I searched >>for about 30 minutes and couldn't find it. > > > > http://www.ph.utexas.edu/~itiq/chiu/cooley/ > > And I found a good, non-technical overview of why FFT is so > important: > http://www.siam.org/siamnews/mtc/mtc593.htm > > And this: > The adve...

how to implement Fast Fourier Transform on virtex pro
I am a student and a novicee for FFT... can any one tell me how to start with implementing Fast Fourier Transform on xilinx virtex pro. i know there xilinx core generator which can do... but i want to do it for floating point.... any help for this starter... would be highly appreciated... i am getting lots of info, but there is nothing that is convincing me... IF any one can tell me the steps how to atleast start with this project thanks in Advance Peace aj wrote: >I am a student and a novicee for FFT... can any one tell me how to >start with implementing Fast Fourier Transform on xil...

How to do a fast fourier transform of two data sets at the same time
I have two sets of data that when plotted together make a nice sinusoidal curve. I know how to do a fast fourier transform of one of the set of values, but really what I want to do is a fourier transform of the graph that the two sets make when plotted together. How can I do this? Thanks, Samantha "Samantha Carter" <samiola_c@hotmail.com> wrote in message <id8fvq\$h77\$1@fred.mathworks.com>... > I have two sets of data that when plotted together make a nice sinusoidal curve. > > > I know how to do a fast fourier transform of one of the set of...

rlft3.f (3D Fast Fourier transform subroutine)??? #2
Dear all; I'm going to use rlft3.f (3D Fast Fourier transform subroutine in Numerical Recipes book ) I have constructed a 107*107*107 mesh for data. I should call rlft3(data,speg,nn1,nn2,nn3,isign). ----------------------------------------------------------------------------- SUBROUTINE rlft3(data,speq,nn1,nn2,nn3,isign) INTEGER isign,nn1,nn2,nn3 COMPLEX data(nn1/2,nn2,nn3),speq(nn2,nn3) ----------------------------------------------------------------------------- 1- I don't understand why for data is written nn1/2 ? I have a 107*107*107 mesh!!! 2- Is it true to put ...

"3D Fast Fourier Transform of a step function"
Dear all ; I found a subroutine for "Fast Fourier Transform of a step function" but in 1D. (you can see it at below) Would you please guide me what changes should I do to convert it to 3D? I don't understand exactly what happens in this subroutine! Your help is greatly appreciated. Best Wishes, Fatemeh -------------------------------------------------------- PROGRAM xfour1 ! driver for routine four1 INTEGER NN, NN2 PARAMETER ( NN=64, NN2=2*NN ) REAL data(NN2), dcmp(NN2) INTEGER i,isign,j open (unit=1, file='dataStep.dat',s...

"Fast Fourier Transform of a Step-function in 3-dimonsional."
I'm looking for a subroutine of Fortran90 about "Fast Fourier Transform of a Step-function in 3-dimonsional." I read the related subroutines in Numerical Recipes Book, but I couldn't match it for a 3D step function. Whould you please let me to have access to a subroutine for mentioned goal? I don't know how I should match this subroutine between 3D step function and FFT. I'm anxiously looking forward your reply. Kind Regards, Fatemeh Fatemeh wrote: > I'm looking for a subroutine of Fortran90 about "Fast Fourier > Transform of a Step-function in 3-di...

Question about fourier transform and laplace transform
Hi I am a computer engineering student.I have to know the difference betwee Fourier transform and Laplace transform. Because we have studied laplac transform previous semester, that time to find a frequency response of system we replaced s by jw in a s domain transfer function, but now we ar using Fourier transform. Can we get Fourier transform by replacing s by jw in a Laplace transform? pls make me clear any one. Hi, There was a discussion on this topic earlier. http://www.dsprelated.com/showmessage/89022/1.php Regards Bharat www.arithos.com >I am a computer engineering stud...

Fast sine & fast cosine transforms!
Hi Guys, I want to write codes for fast sine and fast cosine transforms by using matlab function fft. I'll be thankful for your help. A ...

Fourier Transform
Hi, let's say I have 2 graphs (2 arrays with numbers). They both look different but are similar. I'm doing a FFT on one of the arrays and then zero out some of the coefficients and then do an inverse FFT on that array to try to get the 2nd array. When I plot the 2nd array and the inverse one I get something similar to it but not close enough. I've tried zeroing many coefficients but can't get anywhere. What would be the best way to do this? Thanks. In article <0976cc7b-4c34-4355-aa06-1cc52757cbe7@o14g2000yqe.googlegroups.com>, Ammar Yusuf <amyusuf1@gmail.co...

If a z transform has a pole on the unit circle does that signal have a fourier transform?
Hi, If I have been given a z-transform and I know that the z transform has a pole on the unit circle at a certain angle, does it mean that the fourier transform does not exist at all, because I have read a paper where the author tries to derive the fourier transform from the z transform even when it has a poleon the unit circle. I know if all the poles are inside the unit circle and if the signal is causal, we can substitute exp(jw) for z and get the z transform..but what if the signal is causal and the z transform has a pole on the unit circle? I can post the research paper if you want. Bye ...

Fast Java class for the Walsh Hadamard transform and the O'Connor transform
What has the O'Connor transform got to do with compression you might ask? Well you can use it for high speed compressive sensing. http://code.google.com/p/lemontree/downloads/list If you don't know what compressive sensing is you really should look it up: http://nuit-blanche.blogspot.com/ ...

Graph Fourier Transform
Hi, I'd really appreciate some help on how I should graph a Fourier Transform of a sin function. I am trying to create a frequency spectra of a sound and have the input: FourierTransform[Sum[ampout[i]*Sin[(2.*3.14159*freq[i])t], {i, 1, 18}], t, ?] As I am trying to get the continuous Fourier Transform. However the answer this gives me is full of dirac deltas, which will plot to zero on a graph: Plot[FourierTransform[Sum[ampout[i]*Sin[(2.*3.14159* freq[i])t], {i, 1, 18}], t, 300], {t, 0, 40}, Axes -> True] Does anyone know how I can manipulate the data to get t...

how to fourier transform an image?
I want to play a little bit with fourier transformations. Until now I always used phantom(256) to get a object and fourier transformed it. Now I would like to use pictures. For example I created a circle with my drawing program and saved this file as an jpeg. if I now load this picture with imread('pic.jpg') I can't fourier transform it because it is not a double class but some uint8 class object. I tried to save the picture as an indexed file (thats what the matlab help says) but it didn't help. so is there a way to load picture in order to do fft? If not, is there a way to dr...

Fourier Transform #4
Mathematica hangs when trying to evaluate the simple Fourier Transform of H(a-|t|). FourierTransform[HeavisideTheta[a-abs[t]],t,w,Assumptions->a>0] (The answer should be Sqrt(2/Pi) (Sin[w a])/w ) jstorch@earthlink.net wrote: > Mathematica hangs when trying to evaluate the simple Fourier Transform > of H(a-|t|). > > FourierTransform[HeavisideTheta[a-abs[t]],t,w,Assumptions->a>0] > > (The answer should be Sqrt(2/Pi) (Sin[w a])/w ) > If you replace abs with Abs, it will not hang. Remember: All Mathematica build-in function-names start wit...

Re: Fourier Transform
On 1/14/12 at 2:56 AM, jstorch@earthlink.net wrote: >Mathematica hangs when trying to evaluate the simple Fourier >Transform of H(a-|t|). >FourierTransform[HeavisideTheta[a-abs[t]],t,w,Assumptions->a>0] >(The answer should be Sqrt(2/Pi) (Sin[w a])/w ) Using In[2]:= \$Version Out[2]= 8.0 for Mac OS X x86 (64-bit) (October 5, 2011) I don't have any problem with this when I replace abs with Abs. If you use abs instead of Abs then it should not be surprising Mathematica has difficulty since abs is not defined. ...