Check whether argument 'Kmax' was provided and is adequate before subsampling. Propose adequate value if Kmax is not provided.
argcheck_Kmax(Kmax, lmin, datalength)
maximum number of segments.
minimum length of segments.
length of data provided
an integer