Extract values from tables with different number of columns using a specified condition

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 commentaires

Yes, you're right thank you... I forgot that this topic had something to do with SQL. I'm understanding that Matlab is not very suitable for this kind of tasks, expecially when there are >2 tables like in this case
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.
Yes I was wrong, I meant different column lenght. I edit

Connectez-vous pour commenter.

Réponses (0)

Catégories

Produits

Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by