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!