title: quantize an analog signal in matlab
body: <p>Sample and quantize the signals <code>y1= sin(2000πt) + cos(2000πt) with Ts = 0.1 ms and for 0 ≤ t ≤ 2 ms</code>. Where Ts is the sampling interval and the ADC has 8, 16, and 32 uniform quantization levels.</p>
  
  <p>I can't figure out how to go about quantizing the signal in <code>Matlab</code>. I can create the signal but I am stuck on the quantizing part.</p>
  
  <pre><code>t=(0:.00001:.002);
  
  x=sin(2000*pi*t)+cos(2000*pi*t);
  
  plot(t,x);'
  </code></pre>
  
  <p>Where do I go from here? I am fairly new to <code>Matlab</code>.</p>