How to create pairwise comparison matrix for row matrix?
显示 更早的评论
hai, example matrix :
a=[3 3 2 3 5 3 5 3 4];
How to create a pairwise comparison matrix for the above row matrix?
Thanks in advance
回答(1 个)
Bruno Luong
2018-10-31
编辑:Bruno Luong
2018-10-31
Replace == with whatever comparison operator that is suitable for you
C = a == a.'
Edit, seem like you want (this is called division, not comparison)
C = a.' ./ a
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!