https://de.mathworks.com/help/comm/ref/dpcmenco.html
dpcmenco - Encode using differential pulse code modulation - MATLAB
This MATLAB function returns an index indx by encoding the signal sig using differential pulse code modulation (DPCM).
encodeusingdifferentialpulsemodulation