Table Assignment using two tables of different height.
Mostrar comentarios más antiguos
I have two tables of different heights: table1 and table2.
Both tables have the field x and table2 also has the field y.
I want to assign to table1 the parameter y where the table1 x parameter is equal to the table2 x parameter.
Since the tables are big It would be too inefficient of me to try and do double for loops I believe. Can someone help me with an efficient code to do that?
To be more informative, I'd like to do:
table1(table1.x == table2.x).y = table2.y
But since the two tables are not in the same height I can't do that.
Respuesta aceptada
Más respuestas (1)
Adam Danz
el 9 de Feb. de 2022
0 votos
1 comentario
kuku hello
el 10 de Feb. de 2022
Editada: kuku hello
el 10 de Feb. de 2022
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!