Pairwise difference between values of a vector
显示 更早的评论
Hello all, I want to calculate the mean of all absolute pairwise differences (Ei-Ej) from a long set of values. for example (3 1 2) the differences are 3-1=2, 3-2=1, 1-2=1 and the mean (2+1+1)/3=1.33. Thanks for helping
采纳的回答
更多回答(1 个)
James Cai
2018-1-31
2 个投票
Nowadays, dv = abs(v-v') returns the absolute pairwise differences.
类别
在 帮助中心 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!