%Spring 99 ECOMMS Class Demo
%S. Mandayam, Rowan University
%Mid-rise and mid-tread quantization

close all;
clear;

partition=[-6:2:6];

x=[-8:0.01:8];

y1=quantiz(x,partition);
y=(y1-3.5)*2;

plot(x,y);grid on;
xlabel('input x');
ylabel('output y');
title('Uniform Quantization - Midrise');

pause;

y=quant(x,2);
figure;
plot(x,y);grid on;
xlabel('input x');
ylabel('output y');
title('Uniform Quantization - Midtread');




