MATLAB fourier synthesis

  • #1
Hi I wanted to check how to do a fourier synthesis to recreate a signal from a frequency spectrum. So I basically have the frequency spectrum so I have the power of the fundamental frequency and the harmonics. Is there a way I can do a synthesis to create a time signal?
 

Answers and Replies

  • #2
f95toli
Science Advisor
Gold Member
3,037
536
If you have the spectra you should be able to just do an inverse transform (ifft).
There are a few things that can cause problems (read up on the fftshift command in the manual); but it should not be very difficult.

Have a look at some examples in the manual.
 
  • #3
is there are a way I can do it from fourier synthesis using a version of the code
for i =1:n (N = no of harmonics)
y = y + p(n)*cos(2*pi*n*f*t)

end

where P(n) is the power and f is the fundamental frequency
 
  • #4
f95toli
Science Advisor
Gold Member
3,037
536
Only if the original Fourier transform was done using a discrete cosine transform and the signal had some unusual properties(I think?); the inverse transform fir the cosine transform is as far as I know more complicated than what you have in your program
Hence, I guess the answer is perhaps yes for some signals but not in general.

Have a look at the wiki for discrete cosine transforms if this is really what you need. If your spectra was calculated from the usual FFT you need to use the IFFT function.
 

Related Threads on MATLAB fourier synthesis

  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
0
Views
6K
  • Last Post
Replies
4
Views
83K
Replies
1
Views
18K
  • Last Post
Replies
3
Views
78K
Replies
5
Views
10K
Replies
1
Views
20K
Replies
1
Views
5K
Replies
4
Views
26K
Replies
1
Views
6K
Top