Technical discussion about Matlab and issues related to Digital Signal Processing.
Hello everybody, I am writing a simple am modulator (actually ssb, but it does not really matters :) ). This script shall take as input an audio signal and give as output the am modulated signal. The problem I am facing is the following. The input audio signal as, for instance, a sampling frequency of 8kHz. In the am modulator script I have much higher frequency rates: the carrier has a frequency of 20 kHz and therefore my highest frequency can become 28 kHz, which means 56 kHz of sampling frequency. All this results in a really big mess one it comes to plot the results: indeed the input signal has one sampling frequency but the script works at another (higher) sampling frequency. How can I go around this problem? Ive thought about upsampling, but this creates longer vectors which mess up my script!! :S thank you for your help! :) mathias
Keep your sampling frequency according to the highest frequency expected in your system maybe a simple matlab example helps... clear all T = 1/100; fm = 0.25 fc = 10 mt = sin(2*pi*fm*[0:T:10]) ct = sin(2*pi*fc*[0:T:10]); yt = mt.*ct; plot(yt) Krishna http://www.dsplog.com On 10/20/07, m...@gmail.com <m...@gmail.com> wrote: > Hello everybody, > I am writing a simple am modulator (actually ssb, but it does not really > matters :) ). This script shall take as input an audio signal and give as > output the am modulated signal. > > The problem I am facing is the following. > The input audio signal as, for instance, a sampling frequency of 8kHz. In > the am modulator script I have much higher frequency rates: the carrier has > a frequency of 20 kHz and therefore my highest frequency can become 28 kHz, > which means 56 kHz of sampling frequency. > All this results in a really big mess one it comes to plot the results: > indeed the input signal has one sampling frequency but the script works at > another (higher) sampling frequency. > > How can I go around this problem? > Ive thought about upsampling, but this creates longer vectors which mess up > my script!! :S > > thank you for your help! :) > > mathias >