joining two timetables to complete the timeseries
Afficher commentaires plus anciens
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
Réponses (2)
KSSV
le 20 Nov 2021
0 votes
You can fill the NaN values using fillmissing. Read about it.
3 commentaires
Muhammad Haris Siddiqui
le 20 Nov 2021
KSSV
le 21 Nov 2021
What happened when you have used outerjoin ? It is the function to be used to join two tables.
Muhammad Haris Siddiqui
le 21 Nov 2021
Peter Perkins
le 23 Nov 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.
Catégories
En savoir plus sur Timetables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!