From 6f90c710ef0e802e91ec683adfe1195bc6785382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barre=CC=81?= Date: Tue, 27 May 2014 00:06:02 -0400 Subject: [PATCH] Commit 40ab4d7 breaks a unit test. The code was shifted in consequence. --- Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m b/Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m index bc544179..ee3c326a 100644 --- a/Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m +++ b/Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m @@ -14,16 +14,14 @@ function btkCropAcquisition(h, startAt, numFrames) % Author: A. Barré % Copyright 2009-2014 Biomechanical ToolKit (BTK). - -if (mod(startAt,1) || mod(numFrames,1)) - error('btk:CropAcquisition','Frame numbers must be real positive integers'); -end ff = btkGetFirstFrame(h); lf = btkGetLastFrame(h); if (nargin == 2) numFrames = lf - ff + 1 - startAt + 1; end -if ((startAt < ff) || startAt > lf) +if (mod(startAt,1) || mod(numFrames,1)) + error('btk:CropAcquisition','Frame numbers must be real positive integers'); +elseif ((startAt < ff) || startAt > lf) error('btk:CropAcquisiton','Invalid index.'); elseif (numFrames > lf - startAt + 1) error('btk:CropAcquisiton','Incorrect number of frames specified.')