How to create pairwise comparison matrix for row matrix?
Show older comments
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
2 Comments
madhan ravi
on 31 Oct 2018
Example of desired output?
RAJKUMAR SUBRAMANIAN
on 31 Oct 2018
Answers (1)
Bruno Luong
on 31 Oct 2018
Edited: Bruno Luong
on 31 Oct 2018
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
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!