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

2 comentarios

Example of desired output?
a=[1 2 3]; % 1 2 3 % 1 1/1 1/2 1/3 % 2 2/1 1/1 2/3 % 3 3/1 3/2 1/1 pairwise=[1/1 1/2 1/3; 2/1 1/1 2/3; 3/1 3/2 1/1];

Iniciar sesión para comentar.

Respuestas (1)

Bruno Luong
Bruno Luong el 31 de Oct. de 2018
Editada: Bruno Luong el 31 de Oct. de 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

Categorías

Etiquetas

Preguntada:

el 31 de Oct. de 2018

Comentada:

el 14 de Nov. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by