Hi, How do you plot cos(omega*t) where omega=2*pi*f, for range of frequency like (20:2000). I am confused because there is both time and frequency, do we need to convert time to frequency domain?
Best Answer
This might guide you a little:
t = linspace(0,10,1000) ; % time vector
f = 20 ; % a frequency
omega = 2.*pi.*f ; % calculate omega
y = cos(omega.*t) ; % calculate cosine for this time span
plot(t,y) % plot it
(btw, I prefer to use the .* notation for multiplication)
For all but the simplest cases the term bandwidth is ambiguous. You probably want to look at the long-time Fourier transform instead of the short-timer (i.e., spectrogram). Assuming your audio signal is single channel and called x
plot(20*log10(abs(fft(x))))
From there you might be able to define the lower and upper frequency bounds of your signal.
Best Answer