Pairwise summation of two vectors?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jakub
am 30 Nov. 2014
Bearbeitet: Azzi Abdelmalek
am 30 Nov. 2014
Is there a way how to do easily pairwise summation between two vectors? Something like pdist but with sum instead of distance. I want to have sum of every number of one vector with every number of second vector. Thanks
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 30 Nov. 2014
Bearbeitet: Azzi Abdelmalek
am 30 Nov. 2014
a=[1 2 3]
b=[4 5 6 7]
c=bsxfun(@plus,a.',b)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!