How to generate all pairwise differences between two vectors
Mostrar comentarios más antiguos
Hi,
how can I generate a new vector of all the pairwise differences between two existing vectors?
thanks,
Tamir
Respuestas (4)
Andrei Bobrov
el 6 de Feb. de 2019
out = a(:) - b(:)';
Tamir Eisenstein
el 7 de Feb. de 2019
0 votos
Tamir Eisenstein
el 15 de Feb. de 2019
Editada: Tamir Eisenstein
el 15 de Feb. de 2019
0 votos
Andrei Bobrov
el 15 de Feb. de 2019
0 votos
out = (a(:)' - b(:))./b(:)*100;
Categorías
Más información sobre Discrete Math en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!