double
Converts A into double precision type.
Syntax
R = double(x)
Inputs
- x
- Any valid scalar | vector | matrix.
Outputs
- R
- Converted number.
Example
Basic
example:
R = double(2.3)
R = 2.3
String example:
double('test string')
R = [ 116 101 115 116 32 115 116 114 105 110 103 ]
Complex
matrix:
R = double([2,3,8.2i-3.2,-5.1i])
R = [ 2, 3, -3.2 + 8.2i, -5.1i]
Complex
number:
R = double(2i-9)
R = -9 + 2i
Comments
If a string is given, the string is converted into its ASCII value matrix. That matrix is then converted into double precision type.