"delayedT" variable in the above MATLAB script can have decimal values, and if you try to use it for indexing with "LabResponse" variable, MATLAB will throw the "Subscript indices must either be real positive integers or logicals." error.
You may find the following code to be useful for achieving what you are trying to do:
data = rand(1,10);
time = 1:10;
LabResponse = [time', data'];
shift = 2;
output = LabResponse(1:length(LabResponse)-shift, 2) - LabResponse(shift+1:length(LabResponse),2)
As you can see from the "output" variable, its length is 8 (total length - shift = 8) and also, output(1) = data(1) - data(1+shift). I hope this helps.