Fill table field based on field values from another table
Afficher commentaires plus anciens
I want to move values from one table to a different table based on matching field names across both tables. I'm hoping to do so without using costly for loops, as the dataset is fairly large. I've tried using ismember and field indexing, but it seems so clunky and I can't get it to work.
In the example below, Tables A and B already exist and both have the field "ID". Table A may have other fields, but new fields are trying to be added. The goal is to fill "NewField1", "NewField2", and "NewField3" in Table A based on the corresponding fields in Table B. In the image below, the yellow cells indicate fields I'd like to be filled.

This is exceptionally straightforward in Excel with VLOOKUP, but I'm having trouble finding an efficient analog in MATLAB.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Tables 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!