Matlab Code for Square Wave Samping And Quantization

% program for sampling and quantization
clc
close all;
clear all;
t= [0:.1:2*pi];
s= square(2*t,50);
subplot(3,1,1)
plot(t,s)
title('Input Square signal')
subplot(3,1,2)
stem(t,s)
title('sampling of signal ')
v= [-1.8:.2:1]
w = [-2:.2:1]
[x,y] = quantiz(s,v,w);
subplot(3,1,3)
plot(t,s,t,y,'r')
legend('original signal ', 'quantization signal')

Contact:  
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com

Share:

Contact Us

Name

Email *

Message *

Blog Archive

Blog Archive

Popular posts