Graphics Reference
In-Depth Information
Remainder of division of 4.1 by 1.2:
>> rem (4.1,1.2)
Ans =
0.5000
The remainder of the division of -4.1 and 1.2:
>> rem (-4.1, 1.2)
Ans =
-0.5000
Maximum common divisor of 1,000, 500 and 625:
>> gcd (1000, gcd (500,625))
Ans =
125.00
The least common multiple of 1,000, 500 and 625:
>> lcm (1000, lcm (500,625))
Ans =
5000.00
A.5 Numbering Systems
MATLAB allows you to work with any base numbering systems, as long as the extended symbolic math Toolbox is
available. It also allows to express all kinds of numbers in different bases. This implements the following functions:
dec2base (decimal, n_base)
Converts a decimal (base 10) number specified to the new base given by n_base
base2dec(number,B)
Converts the given base B number to a decimal number
dec2bin (decimal)
Converts the specified base 2 (binary) number to a decimal number
dec2hex (decimal)
Converts the specified base 16 (hexadecimal) to a decimal number
bin2dec (binary)
Convert the binary number to a decimal base
hex2dec (hexadecimal)
It converts the number base 16 specified to a decimal base
 
Search WWH ::




Custom Search