フィルターのクリア

Pairwise summation of two vectors?

4 ビュー (過去 30 日間)
Jakub
Jakub 2014 年 11 月 30 日
編集済み: Azzi Abdelmalek 2014 年 11 月 30 日
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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 30 日
編集済み: Azzi Abdelmalek 2014 年 11 月 30 日
a=[1 2 3]
b=[4 5 6 7]
c=bsxfun(@plus,a.',b)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by