HELP WITH Integral nonlinearity (INL) and differential nonlinearity (DNL) of data converters
Show older comments
Hi, I'm developing an A/D converter in the LTspice program. However, the circuit presented problems and I only have the transfer curve.
I need to perform performance tests, find the INL and DNL error, how to do it in matlab?
Does anyone know how to assemble the function below from the vectors I have for the curve?
s = inldnl(analog,digital,range,type)
s = inldnl(___,Name,Value)

Thanks
1 Comment
Sumukh
on 25 Sep 2024
Hi Gabriela,
You can refer to the following documentation to understand how to use the “inldnl” command available in the Mixed Signal Blockset:
The command has 4 input arguments:
- “analog” is the analog data in vector format
- “digital” is the digital data in integer vector format
- “range” is a 2-element vector representing the nominal analog dynamic range
- “type” is the DUT used to get the data, whether it is an ADC or DAC.
In addition to the above input arguments, “Name-Value” pairs can be passed to the command for additional options to calculate the INL and DNL. The output of the command is a struct with the INL and DNL data returned as column vectors.
Can you please share the data here?
Answers (1)
Pragati
on 5 Jun 2026
0 votes
You can compute INL and DNL directly from your transfer curve using the built‑in inldnl function in MATLAB.
s = inldnl(analog, digital, range, 'ADC');
- analog → input voltage vector
- digital → corresponding output codes
- range → input full-scale range (e.g., [-1 1])
This function returns INL and DNL as vectors in a struct and works directly with your measured data.
https://www.mathworks.com/help/msblks/ref/inldnl.html
Categories
Find more on Sensors and Transducers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!