Difference between the arrays
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ananya Malik
am 11 Aug. 2016
Kommentiert: Ananya Malik
am 11 Aug. 2016
I have 2 arrays A= [1 2 3 4] and B = [2 3 4 5] representing paths in a graph. I want to find difference between the arrays. A-B =[1 2] and B-A = [4 5]. Can any one help. Thanks in advance.
2 Kommentare
Cyrus
am 11 Aug. 2016
Hi,
Shouldn't A-B = [1] and B-A = [5] ?
to my understanding you want to keep the numbers that are not repeated in the other array, is that right?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Entering Commands 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!