Extracting data from two tables with the same ID's
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two tables:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/620888/image.png)
So they are different size, and ID's from first columns are the same identificators. I would like to extend the table Selected_Processess, so in 3rd column I'd parameter amount_of_occurences from table Processes(:,2) but just for shared ID's from first columns, so for example for the first 2 rows(only this two are visible and shared ID's between the tables in those screenshots) it would look like:
table = [2 2 6;
15 1 4]
After this, the table should have size 228x3.
I was doing similar thing with strings inside cellarray, and function isamember worked perfectly, but for integers it's different.
Ps. I don't mind changing this data from table to any other form such as cell, etc. as long as it would work as I need.
Thanks in advance for your help :)
1 Kommentar
Akzeptierte Antwort
the cyclist
am 17 Mai 2021
I didn't completely follow what you are trying to do, but I'm pretty sure you should be able to use the join command to do what you want.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!