joining two timetables to complete the timeseries
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Muhammad Haris Siddiqui
el 20 de Nov. de 2021
Respondida: Peter Perkins
el 23 de Nov. de 2021
I have two timetables Allyears1 and TS. Allyears1 contains the whole time series with nans and TS contains the missing values of Allyears1.
I want to join these timetable complete the time series
I have tried as shown below but it is not joing the timetables rather just showing in a timetable.
Any help would be appreciated
Thanks
0 comentarios
Respuestas (2)
Peter Perkins
el 23 de Nov. de 2021
Muhammad, join is sort of like a horizontal concatenation operation. That is not, I think, what you are looking for. You say
I have two timetables Allyears1 and TS. Allyears1 contains the whole time series with nans and TS contains the missing values of Allyears1.
but it's not clear what you mean by that. You might mean (1) that TS.Allyears1 contains rowtimes that are not contained in Allyears1, but the union of the two disjoint sets is your complete time series. You might mean (2) that TS.Allyears has rowtimes thjat are also in Alyears1, and in the latter the datavalues are missing inn those rows. Those are very different things.
In any case, you don't want a horz cat, and all those things you tried are essentially that. But there's no reason to use a loop. Use vertcat for (1), then sortrows. Use assignment for (2), something like
Allyears.VarName35(TS.Allyears.Date) = TS.Allyears.TS
But this is all just guesswork. Provide more details.
0 comentarios
Ver también
Categorías
Más información sobre Data Type Identification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!