How to convert 27625 to base 10 from base 7 ?

조회 수: 2 (최근 30일)
Abishek V Iyer
Abishek V Iyer 2015년 6월 19일
댓글: Katalin 2015년 6월 19일
Why do i get an error while trying to convert the number from base 7 to 10?

채택된 답변

Katalin
Katalin 2015년 6월 19일
It cannot have number 7 in it if it is in base 7. Otherwise you would do it like this: base2dec('26625',7)
  댓글 수: 2
Abishek V Iyer
Abishek V Iyer 2015년 6월 19일
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일
Base 7 uses seven symbols. Traditionally, and in matlab, these are digits 0 to 6.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by