am_mod.m
Upload User: loeagle
Upload Date: 2013-03-02
Package Size: 1236k
Code Size: 0k
Development Platform:

Matlab

  1. function u=am_mod(a,m,ts,fc)
  2. %       u=am_mod(a,m,ts,fc)
  3. %AM_MOD     takes signal m sampled at ts and carrier
  4. %       freq. fc as input and returns the AM modulated
  5. %       signal. "a" is the modulation index
  6. %       and ts << 1/2fc. 
  7. t=[0:length(m)-1]*ts;
  8. c=cos(2*pi*fc.*t);                 
  9. m_n=m/max(abs(m)); 
  10. u=(1+a*m_n).*c;