how to convert numbers to letters

hi,i'm trying to convert numbers to letters,i'm asking if there is a function maybe? ,for example : '' they are 3 friends since 2015 '', should become ''they are three friends since two thousand and fifteen''i had a programm but only if there is one number

3 Commenti

here is the programm:
{fid = fopen('francais.txt'); % francais is(les 3 poules)
b = fread(fid,21)';
fclose(fid);
a=dec2bin(b);
c=dec2hex(b);
str = native2unicode(b,'UTF-8');
disp(str);
fid = fopen('fichier3.txt'); %fichier3 is(trois)
b3 = fread(fid,'uint8')';
fclose(fid);
str3 = native2unicode(b3,'UTF-8');
disp(str3);
nbrasci=abs(str);
for i=1:1:length(str)
if nbrasci(i)==51
str=char([nbrasci(1:i-1),str3,nbrasci(i+1:length(str))]);
end
end}
See Convert number to words, by Nwaobasi Chukwuemeka and search the File Exchange for more

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Programming in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by