Why do i get an error while trying to convert the number from base 7 to 10?

 채택된 답변

Katalin
Katalin 2015년 6월 19일

2 개 추천

It cannot have number 7 in it if it is in base 7. Otherwise you would do it like this: base2dec('26625',7)

댓글 수: 2

Thank you very much ... Also what is the difference between having = 'xxxxx' and simply xxxx (without the inverted commas) ?
Katalin
Katalin 2015년 6월 19일
You are welcome! :-) The syntax is: d = base2dec('strn', base); It has to be a string (that's why the ''), as for example higher than 10 base numbers have letters in them e.g. base 16 has abcdef characters in the numbers.

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

추가 답변 (1개)

Guillaume
Guillaume 2015년 6월 19일

1 개 추천

Base 7 uses seven symbols. Traditionally, and in matlab, these are digits 0 to 6.

카테고리

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

질문:

2015년 6월 19일

댓글:

2015년 6월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by