how to assign characters?
Mostrar comentarios más antiguos
if my input is a, then i should get always as u.... input is b means i should always get as w..... what techniques should be followed to achieve this.. should i use string concept..
Respuesta aceptada
Más respuestas (1)
Jan
el 14 de Feb. de 2013
You can create a lookup table:
pool = repmat(char(0), 1, 255);
pool('a') = 'u';
pool('b') = 'w';
...
% Or together:
pool('ab') = 'uw'; % A strange indexing, but it works
And then:
c = 'a';
pool(c)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!