Skip to content

Commit

Permalink
Commit 40ab4d7 breaks a unit test. The code was shifted in consequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alzathar committed May 27, 2014
1 parent c905754 commit 6f90c71
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Documentation/Wrapping/Matlab/btk/btkCropAcquisition.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit 6f90c71

Please sign in to comment.