Code covered by the BSD License  

Highlights from
Contemporary Communications Systems Matlab Files

image thumbnail

Contemporary Communications Systems Matlab Files

by

Omar Ruiz (view profile)

 

Matlab Files in this book

ip_04_09.m
% MATLAB script for Illustrative Problem 4.9.
clear
echo on
t=[0:0.01:10];
a=sin(t);
[sqnr8,aquan8,code8]=u_pcm(a,8);
[sqnr16,aquan16,code16]=u_pcm(a,16);
pause	% Press a key to see the SQNR for N = 8.
sqnr8
pause	% Press a key to see the SQNR for N = 16.
sqnr16
pause	% Press a key to see the plot of the signal and its quantized versions.
plot(t,a,'-',t,aquan8,'-.',t,aquan16,'-',t,zeros(1,length(t)))

Contact us