Merge multiple tables with three keys
Afficher commentaires plus anciens
I have three tables with the same categories of data. All three tables have these three keys - "Outcome","Range","ROI". There are 4 possible outcomes, 8 possible ranges and 68 possible ROIs (all ranges and all ROIs can be within any of the four outcomes). I want to merge them using these three keys. I tried outerjoin which works for two but not three simultaneously. I tried merging two first and then adding the third to the new table (of the first two joined together). The issue with this approach is that I have to choose which of the first two table keys I want to use in the new merged table. So if I choose the first table keys this is not a problem for rows where table 1 and 2 have the same data or table 3 and table 1 have the same data. But for rows where table 3 and table 2 have the same data and table 1 does not then the data here is not matched (because I used keys matching first and third table). Is the a way to do this? Possibly by making a master table where all possible variatons are included and then matching the three tables to this master key?
Example:
Outcome = ["11_right", "12_right"]';
Range = ["80ms,110ms" "110ms,140ms", "140ms,195ms"]';
ROI = ["Red", "Yellow", "Blue, "Green"];
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur ROI-Based Processing 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!