This checks seems to be necessary because if the frames are calculated elsewhere in Matlab numFrames and startAt are generally integer numbers in "double" format. The original btkCropAcquisition function gives an error if index are not in integer format.