Intersect, Compare two columns or two matrix and extract common information
Mostra commenti meno recenti
Hi All,
I have a matrixe with 4 columns (A to D) or 1 to 4. I want to compare columns 2 and 4 and if a match is found, put the entire corresponding rows in a separate matrix called Match. Ex ample when it comes to row 2, under coulms 2 (B) AND 4 (D), the vaule 12.1 is common to both. Hence put this entire matching row in a new matrix which will become 12, 12.1, 12.4, 12.1
The idea is to extract information common to both columns 2 and 4, for each row and after finding this common information, include with them their associated information in coulmns 1 and 3. Please see attached im
I tried using the intersect function but it doesnt work the way I want it to.
Thanks very much.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Object Detection in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!