Extract values from tables with different number of columns using a specified condition
1 view (last 30 days)
Show older comments
Hello everyone! I'm trying to do something that I am not able to do actually, and I hope it is possible. I need to ask for some help. I'm working with 16 tables that have different column lengths. All the tables have 3 columns containing the date('MM/dd/yyyy'), hour('hh:mm:ss') (both in datetime format) and the numerical value. I would like to obtain a new table with the numerical values of all the 16 tables extracting them ONLY where the date and the hour coincide (i.e. are present) in all the tables, for istance: if in ALL the 16 tables I have a numerical value on 11/10/2021 at 06:00:00, I need to extract and put them in the new table, which will have 2 + 16 columns (2 columns for date and hour + the 16 values from each table) and repeat this operation for all the coincident dates + hours. Hope that my question is clear! Thank you
4 Comments
Matt J
on 26 Jan 2022
All the tables have 3 columns containing the date('MM/dd/yyyy')
The title of your post says that the tables have different numbers of columns
I'm working with 16 tables that have different row lengths.
If each table has 3 columns, then the length of a row in all of them is 3.
Answers (0)
See Also
Categories
Find more on Tables 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!