comparing an array element with a binary number?

let the first elements of 2 arrays c,b are c(1,1)=10101010 and b(1,1)=0
i want to compare it with 01111111 and 10000000 and b(1,1)=0 in one statement. how to do..
Thanks in advance

3 comentarios

Please confirm that when you say c(1,1) = 10101010 that you mean that c(1,1) has stored in it the decimal value 10 million, one hundred and one thousand, and ten, whose binary equivalent would be '100110100010000100010010'
Image Analyst
Image Analyst el 14 de Nov. de 2016
Editada: Image Analyst el 14 de Nov. de 2016
When you say it in "i want to compare it", what is the "it" that you are referring to? And when you say "01111111" are you referring to a number, in which case the leasing zero is ignored, or do you mean a string (a character array)? And also, please define what "compare" means to you. Do you want a simple true or false if the "it" is identical to some other expression?
Jan
Jan el 16 de Nov. de 2016
@aditya: When you do not answer questions for clarifications, the reader get the impression that you are less interested in the solution of your problem and maybe they stop to care also.

Iniciar sesión para comentar.

Respuestas (0)

Preguntada:

el 13 de Nov. de 2016

Comentada:

Jan
el 16 de Nov. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by