convert an array of alphabet letters into numbers ; A =a1, B =2, C = 3 etc.

23 visualizaciones (últimos 30 días)
Hi everyone can you have me solve this problem
i have a code change numbers into letters is
Alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
numbers = [3,6,12,1,1,3]
letters = Alphabet(numbers)
Can you give me a code change letters into numbers ?
Thanks you very much

Respuesta aceptada

madhan ravi
madhan ravi el 4 de Jul. de 2020
Alphabet = ['C F L A A C' ];
[ii, lo] = ismember(Alphabet, 'A':'Z');
Numbers = lo(ii)

Más respuestas (1)

Kanupriya Singh
Kanupriya Singh el 4 de Jul. de 2020
I think using this code would help you out:
word = 'WELCOME'
double(word) - 64

Categorías

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

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by