title: MATLAB - FM Modulation
body: <p>I am trying to Frequency modulate a sine signal using Matlab. I have written the following code for the same:</p>
  
  <pre><code>fc = 5000; %Carrier Frequency
  fs = 1000; %Signal Frequency
  t = 0:0.00001:0.002;
  x = sin(2*pi*fs*t);
  dev = 50;
  subplot(2,1,1);
  plot(t,x);
  y = fmmod(x,fc,fs,dev);
  subplot(2,1,2);
  plot(t,y);
  </code></pre>
  
  <p>It is able to display the first plot command but not the second one. It throws an error: <code>`fmmod' undefined near line 10 column 5</code>. What is wrong in the above code?</p>