assigning value to character and that value is assigned in the pattern

sir,i have defined a pattern['00100101';'10100100'] and an character array chars{'a','b'}; if i give the input character as 'a' then it should be assigned as '00100101'.sir could you help me how to write the code for it.

2 comentarios

What does this have to do with the tags (image processing)?
Assume steganography. Or modified huffman encoding such as for JPEG.

Iniciar sesión para comentar.

 Respuesta aceptada

pats = {'00100101';'10100100'};
this_char = 'a';
pats{this_char - 'a' + 1}

Más respuestas (0)

Categorías

Más información sobre Encryption / Cryptography en Centro de ayuda y File Exchange.

Preguntada:

el 24 de Dic. de 2013

Respondida:

el 24 de Dic. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by