% qdemo.m
% illustrates that more quantization levels is often better


if 1
	p = 10
	n = [0:10-1]';
	x = sin(2*pi*n/p);
	x(p/2+1) = 0;
	t = x(:,ones(1,1000)); x = t(:);	clear t
	sound(x), pause

	y4 = qtize(x, 4);
	sound(y4), pause
	y5 = qtize(x, 5);
	sound(y5), pause

	n = 1:length(x);
	plot(n, x, '-', n, y8, 'o', n, y9, 'x')
	axisx(0, 100)
return
end

if 0
	load ../matfiles/krushchv.mat

	n=2000:30000;
	n=1:length(x);
	n=18000:28000;

	y = qtize(x, 2);

	plot(n, x(n), '-', n, y(n), '.')
end
