Difference between the arrays
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ananya Malik
el 11 de Ag. de 2016
Comentada: Ananya Malik
el 11 de Ag. de 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 comentarios
Cyrus
el 11 de Ag. de 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?
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!