I have several vectors I would like to concatenate, where each element is an increasing timestamp, but how do I concatenate the vectors while ensuring to have an continuously time scale?
Say, I have two vectors tone1_time and tone2_time both given by 1x4801 double. Each element of the vector contain a timestamps and thus the elements must be added when the vectors are concatenated in order to have the correct time. So far I have;
n = 10;
for i = 1:n
time(n,end) = tone1_time + tone2_time;
end
Which generates an error in matlab!
EDIT: More code
I generate two sounds vectors and concatenate them by:
% repeat n times
n = 10;
signal = [ tone1_signal tone2_signal ];
signal = repmat(signal,1,n);
This will e.g. return a new vector signal with a length of e.g. 1x48020 double. The time vector needs to have the same size as this vector, but also still having an continuously time.