Fill table field based on field values from another table
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!