find same pair values from two variables

I have two variables, each variable consist of two columns but different rows Now i have to match pairs in row whether which pairs are common in both variables or not? Attached figure shows variable with two values. Thanks

 Respuesta aceptada

KSSV
KSSV el 25 de Abr. de 2017

1 voto

4 comentarios

Mubashir
Mubashir el 25 de Abr. de 2017
Thanks Stephen for detailed solution! My variables have just 2 decimal values. ismembertol is used for high precised values. My results are same using both commands.
Stephen23
Stephen23 el 25 de Abr. de 2017
Editada: Stephen23 el 25 de Abr. de 2017
"ismembertol is used for high precised values"
Wrong. Here is a very simple example with just one decimal place:
>> ismember(0.1,0.3-0.2)
ans = 0
Like I wrote, you should use ismembertol.
Mubashir
Mubashir el 25 de Abr. de 2017
Yes you are right. Thanks. I have changed my code now.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 25 de Abr. de 2017

Comentada:

el 25 de Abr. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by