Borrar filtros
Borrar filtros

Compare each row of a matrix

2 visualizaciones (últimos 30 días)
Ruben Sierra
Ruben Sierra el 23 de Abr. de 2015
Comentada: Star Strider el 24 de Abr. de 2015
I would like to compare each row of the Matrix with the rest.
For example if you have the matrix:
A = [1 1 1;2 2 2;3 3 3;4 4 4}
Compare first row with the second, third, fourth. And Automatically the Programme takes the second row and do the same process(first, third, fourth), third row with first, second, fourth, and the fourth row with first, second and third.
If someone could help me I would be very greatful

Respuesta aceptada

Star Strider
Star Strider el 23 de Abr. de 2015
I would use the pdist function, and define your own distance metric if it is not one of those already provided.
  2 comentarios
Ruben Sierra
Ruben Sierra el 24 de Abr. de 2015
Thanks for your answer.
Star Strider
Star Strider el 24 de Abr. de 2015
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by