Obtaining correct frequency and normalisation using convolution function
Mostra commenti meno recenti
I wish to better understand the matlab convolution function, conv. My signal is the product of two sin waves of different frequencies in the time domain and so this gives two more sin waves at the sum and difference frequencies. If I directly take the Fourier transform of my signal I see two peaks in the frequency domain as expected. However when I take the convolution of the two individual sin waves I do not get the same result as expected. I can still see the two peaks expected, but they are much more spaced. Is there some way to shift the convolution so it is at the correct frequency?
Here is a simple code to show what I have been trying
```
time=linspace(0,1,10000);
sig=sin(2*pi*10.*time)*100;
sig2=sin(2*pi*20.*time)*100;
sigT=sig.*sig2;
plot(sigT)
FTsig=fft(sig);
FTsig2=fft(sig2);
expFTtot=median(diff(time))*conv(FTsig,FTsig2,'full');
expFTtot2=conv(FTsig2,FTsig,'full');
ft=fft(sigT);
figure(2)
loglog(abs(ft(1:end/2)),'-.')
hold on
loglog(abs(expFTtot(1:end/2)))
loglog(abs(expFTtot2(1:end/2)))
```
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Spectral Measurements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
