How to generate all pairwise differences between two vectors
Afficher commentaires plus anciens
Hi,
how can I generate a new vector of all the pairwise differences between two existing vectors?
thanks,
Tamir
Réponses (4)
Andrei Bobrov
le 6 Fév 2019
out = a(:) - b(:)';
Tamir Eisenstein
le 7 Fév 2019
0 votes
Tamir Eisenstein
le 15 Fév 2019
Modifié(e) : Tamir Eisenstein
le 15 Fév 2019
0 votes
Andrei Bobrov
le 15 Fév 2019
0 votes
out = (a(:)' - b(:))./b(:)*100;
Catégories
En savoir plus sur Discrete Math 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!