In Matlab, I don't know the best way to explain this except for an example. Let's say I have an array called tStart and a tDuration length:
tStart = [3,8,15,20,25];
tDuration = 2;
Is there some way to get a new array such that it would be:
[3,4,5,8,9,10,15,16,17,20,21,22,25,26,27]
So what I want is to use the initial tStart array then make up a new array with the starting value and then next corresponding values for the length of tDuration.
If I do [tStart(1:end)+tDuration] I get an array of ending values, but how can I get the start, end, and all the values in between?
If I [tStart(1:end):tStart(1:end)+tDuration] I get an error.
Any help of a way to do this without a loop would be greatly appreciated.