The main MATLAB function to be used for the computation of the nonlinearity measure is "nsamdf_nonlinear_measure.m", which calls the other subroutines NormedSingleCurveLengthWindowed.m & NormedSingleCurveLength.m.
All necessary info to run the code is given within the comments in nsamdf_nonlinear_measure.m.
Please refer to and cite the paper below if you utilize this code in your work. All necessary info about the nonlinearity measure itself can be found in the paper:
T.E. Özkurt, H. Akram, L. Zrinzo, P. Limousin, T. Foltynie, A. Oswal, V. Litvak, "Identification of nonlinear features in cortical and subcortical signals of Parkinson's disease patients", Neuroimage, 2020.
Contact me through tolgaozkurt@gmail.com, if you have any questions.