For The DAC Given in Problem-3, Assuming N 8, A 0.001 Plot INL and DNL
For The DAC Given in Problem-3, Assuming N 8, A 0.001 Plot INL and DNL
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')
Page 1
Plot
Page 2