You are on page 1of 2

AMSD assignment 15VL01F 2016

For the DAC given in Problem-3, assuming N=8, a=0.001 plot INL and
DNL.
%Plot of INL and DNL
clear all;
% Given data
N=8;
M=2^N;
alpha= 0.001;
%Sweep 'k' from 1 to 255 in steps of 1
k=1:1:255;
%Estimate the number of sampling points
NumSamp=length(k);
for i=1:NumSamp
INL(1,i) = ((k(i)*(alpha/2)*(k(i)-M))/(1+(alpha/2)));
DNL(1,i) = (((alpha/2)*(2*k(i)-M-1))/(1+(alpha/2)));
End
subplot(2,1,1), plot(INL,'r')
xlabel('k')
ylabel('INL')
grid on
grid minor
title('INL plot')
subplot(2,1,2), plot(DNL,'b')
xlabel('k')
ylabel('DNL')
grid on
grid minor
title('DNL plot')

Dept. of ECE, NITK Surathkal

Page 1

AMSD assignment 15VL01F 2016

Plot

Dept. of ECE, NITK Surathkal

Page 2

You might also like