Combine and sorting array values
Afficher commentaires plus anciens
Hello!
I got a result matrix A
A = [3 9 4]
And another matrix B
[ 3 8
4 8
15 5
B= 16 1
16 2
16 7
17 6
17 2 ]
First i want to combine A with all values of the second column of B that have a unique value in the first column -> Matrix AB
AB = [3 9 4 8 5]
As a final result i want the combinations of AB with all values of the second column of B that have not a unique value in the first column ->Result
Result= [3 9 4 8 5 1 6 3 9 4 8 5 1 2
3 9 4 8 5 2 6 3 9 4 8 5 2 2
3 9 4 8 5 7 6 3 9 4 8 5 7 2]
How can i do that?
Many thanks in advance!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrices and Arrays 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!