How to properly determine bandwidth of a signal?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Arquelau
le 23 Oct 2016
Réponse apportée : Walter Roberson
le 24 Oct 2016
Hi,
I am trying to determine the total bandwidth of a signal, given by
cos(200*pi*t) + sin(202*pi*t)
However, I am struggling to do it. I am using the function obw(), but as I change the amount of points in the linspace that defines t, the value found for the bandwidth also changes, and I don't understand why.
Also,the spectra of this signal is not being ploted as I expected it to be. From the theory, I expect impulses in the frequencies 200*pi and 202*pi (negative and positive for both). But what I get is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157374/image.png)
Below is my code:
a = 1;
t = linspace(0,0.5,2000);
x = a*cos(200*pi*t) + a*sin(202*pi*t);
w = obw(x)
plot(t,x);
fftm = fft(x)./numel(x);
fftm = abs(fftm);
fftm = fftshift(fftm);
fscale = linspace(-w, w ,2000);
figure
plot(fscale,fftm);
I am also not sure if I am properly setting the fscale variable.
Can anybody help me? How to properly find the bandwidth of this signal?
Thank you.
0 commentaires
Réponse acceptée
Walter Roberson
le 24 Oct 2016
You should be passing in the sampling frequency to obw.
Assuming your t values are in seconds, it appears to me your Fs would be 3998.
Fs = 1/(t(2)-t(1))
You might be expecting 4000 instead of 3998, but remember that linspace(0, 0.5, 2000) puts a point at 0, and a point at 0.5, and (2000-2) points in-between. If 0 were intended to be the first point in a cycle and 0.5 were intended to be the first point of the next cycle, then for the cycle to be length 2000, time 0.5 would need to be at point 2001.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matched Filter and Ambiguity Function dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!