Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
29
Добавлен:
09.02.2015
Размер:
195.07 Кб
Скачать

If s is a character array, each row is interpreted as a base b string.

Example

base2dec('212',3) returns 23

See also dec2base, hex2dec, bin2dec.

Reference page in Help browser

doc base2dec

<dec2base> - Convert decimal integer to base B string.

DEC2BASE Convert decimal integer to base B string.

DEC2BASE(D,B) returns the representation of D as a string in

base B. D must be a non-negative integer array smaller than 2^52

and B must be an integer between 2 and 36.

DEC2BASE(D,B,N) produces a representation with at least N digits.

Examples

dec2base(23,3) returns '212'

dec2base(23,3,5) returns '00212'

See also base2dec, dec2hex, dec2bin.

Reference page in Help browser

doc dec2base

<num2hex> - Convert singles and doubles to IEEE hexadecimal strings.

NUM2HEX Convert singles and doubles to IEEE hexadecimal strings.

If X is a single or double precision array with n elements,

NUM2HEX(X) is an n-by-8 or n-by-16 char array of the hexadecimal

floating point representation. The same representation is printed

with FORMAT HEX.

Examples:

num2hex([1 0 0.1 -pi Inf NaN]) is

3ff0000000000000

0000000000000000

3fb999999999999a

c00921fb54442d18

7ff0000000000000

fff8000000000000

num2hex(single([1 0 0.1 -pi Inf NaN])) is

3f800000

00000000

3dcccccd

c0490fdb

7f800000

ffc00000

See also hex2num, dec2hex, format.

Reference page in Help browser

doc num2hex

Соседние файлы в папке Библиотеки Matlab