Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
farzad
farzad am 29 Dez. 2019
Bearbeitet: per isakson am 29 Dez. 2019
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 Kommentare
Akira Agata
Akira Agata am 29 Dez. 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 am 29 Dez. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by