How to turn string into numbers it represents without using str2num?

The only functions allowed are:
zeros, ones, reshape, repmat, length, size, max, min, mod, all, any, sort, find, floor, ceil, round, log10, sum

댓글 수: 1

If you were to do this by hand, do you have any ideas about how you would go about it? E.g., how could you figure out the first digit?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 11월 29일

0 개 추천

You cannot do that. Converting a string into a number requires addition (and multiplication makes it easier.) You would also need to index into the string, but indexing is a function.

카테고리

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

질문:

2015년 11월 29일

답변:

2015년 11월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by