string compare of numbers and strings

i have two variables(suppose a and b) which is an array of numbers as well as strings. I want to compare a and b, and my output should be a logical array of same size as a and b.

Respuestas (1)

Kate
Kate el 28 de Oct. de 2015

0 votos

Could you show us some sample data? Off the top of my head I think you need to use strcmp and/or ismember

1 comentario

Praveen Choudhury
Praveen Choudhury el 28 de Oct. de 2015
so this is a sample data where my arrays can be strings or numbers.
I need to compare arrays and get a logical data of arrays. The problem I have is comparing numbers and string at a time.
See the attached

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Preguntada:

el 28 de Oct. de 2015

Comentada:

el 28 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by