title: Wrong amplitude values after the FFT
body: <p>At the plot of the code that written below, i should see amplitude between values of 75 to 200 uV but there is something strange in my plot, can you help me and advise, what wrong with my code and how can i correct that ?</p>
  
  <p>Thank you all</p>
  
  <p><strong>Here is the code :</strong></p>
  
  <pre><code>clear all;
  close all;
  Fs = 200
  t= 0:1/Fs:180
  y_in=zeros (1, length(t));
    for  i = 1:18
  F = randi ([4 7], 1);% frequency
  A = randi ([75 200],1);% amplitude A=75~200 uV.
  y_tmp =A*sin (2*pi*F*t);
   y_in=y_in+ y_tmp;
    end;
  L=length (y_in);
  NFFT = 2^nextpow2(L); % Next power of 2 from length of y
  Y_new = fft(y_in,NFFT)/L;
  f_new = Fs/2*linspace(0,1,NFFT/2+1);
  
  figure(1)
  plot(f_new,2*abs(Y_new(1:NFFT/2+1))) ;
  title('Single-Sided Amplitude Spectrum of y_in(t)')
  xlabel('Frequency (Hz)')
  ylabel('|y_in(f)|')
  </code></pre>