How to generate all pairwise differences between two vectors
Mostra commenti meno recenti
Hi,
how can I generate a new vector of all the pairwise differences between two existing vectors?
thanks,
Tamir
Risposte (4)
Andrei Bobrov
il 6 Feb 2019
out = a(:) - b(:)';
Tamir Eisenstein
il 7 Feb 2019
0 voti
Tamir Eisenstein
il 15 Feb 2019
Modificato: Tamir Eisenstein
il 15 Feb 2019
0 voti
Andrei Bobrov
il 15 Feb 2019
0 voti
out = (a(:)' - b(:))./b(:)*100;
Categorie
Scopri di più su Discrete Math in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!