Hi, excuse me, i hope you can help me with this, i want to convert numbers to letters in matlab, for example: insert number: 21 Answer: twenty one like that , i don't know how to do, what function i have to use?

답변 (1개)

Stephen23
Stephen23 2015년 8월 31일
편집: Stephen23 2016년 8월 10일

2 개 추천

There is no inbuilt MATLAB function that converts numeric values to words, but you can use my FEX submission num2words to do exactly this:
It has been extensively tested, and has lots of useful options too.
Here are some examples:
num2words(0)
ans = 'zero'
num2words(-1024)
ans = 'negative one thousand and twenty-four'
num2words(pi, 'order',-10)
ans = 'three point one four one five nine two six five three six'
num2words(intmax('uint64'), 'sigfig',3, 'type','highest')
ans = 'eighteen point four quintillion'

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

질문:

2015년 8월 31일

편집:

2016년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by