How to concatenate 2 time series that both start from zero?

1 view (last 30 days)
Hi all
How to concatenate 2 time series that both start from zero? Given that both of them have the same time step? Example :
t1=[0,1,2,3]
t2=[0,1,2]
Output
T=[0,1,2,3,4,5]
  4 Comments
Akira Agata
Akira Agata on 29 Dec 2019
Sounds like T = [t1,max(t1)+t2(2:end)].
But could you tell us what is your purpose to create this output? Because, at this time, I have no idea how to utilize this output vector T.
farzad
farzad on 29 Dec 2019
Thank you that worked great !
this is a time series that correlates another variable that changes with time, anything you can immagine, temperature, displacement , velocity. and since that variable is measured in different times , each time , the t variable starts from zero , but now I wanted to plot the whole together
there is one problem now , that since the t2(2:end) starts from the second member, then the total t with have one member less that the total members of the function variable , let's say the velocity

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!