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

1 次查看(过去 30 天)
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 个评论
Akira Agata
Akira Agata 2019-12-29
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 2019-12-29
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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by