Cell comparing logic output

15 visualizaciones (últimos 30 días)
Sujan
Sujan el 22 de Sept. de 2014
Comentada: Sujan el 22 de Sept. de 2014
Friends,
I want to compare 2 cell arrays and if all characters are similar I want to generate 1 as output and else 0 as the output. but i could not find a simple compare function for cell arrays. pls help me on this ? Thanks in advance.

Respuesta aceptada

Adam
Adam el 22 de Sept. de 2014
Editada: Adam el 22 de Sept. de 2014
all( cellfun( @(x,y) isequal( x, y ), cellArray1, cellArray2 ) )
should do the job I think.
  1 comentario
Sujan
Sujan el 22 de Sept. de 2014
It works. awesome. thanks a lot.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by