Well, the quantizer in my previous post is ideal so the DNL/INL will also be ideal.
If you want a "less" ideal quantizer you could implement a flash type as:
ref=[-512:511]/512;
fs=1e6; % sampling rate
f=31*fs/8192; input frequency, 31 is an odd number for coherent sampling, 8192 is the number of samples
x=sin(2*pi*f*(0:8191)/fs); % the input signal
for ii=1:8192
y(ii)=sum(x(ii)>ref); % the quantizer
end
plot
then, using some immagination, you can add your non-linearities to the reference and see what happens to the DNL/INL