How to generate all pairwise differences between two vectors
古いコメントを表示
Hi,
how can I generate a new vector of all the pairwise differences between two existing vectors?
thanks,
Tamir
回答 (4 件)
Andrei Bobrov
2019 年 2 月 6 日
out = a(:) - b(:)';
Tamir Eisenstein
2019 年 2 月 15 日
編集済み: Tamir Eisenstein
2019 年 2 月 15 日
0 投票
Andrei Bobrov
2019 年 2 月 15 日
0 投票
out = (a(:)' - b(:))./b(:)*100;
カテゴリ
ヘルプ センター および File Exchange で Discrete Math についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!