Skip to content

double

Converting an array to a numeric array

double(A)

  • A is an array of any data type (e.g., logical, numeric, or character).
  • It converts A to a numeric array.
  • If A is a character array, its entries are converted to the corrresponding ASCII code values.
  • If A is empty, it returns an empty array.

Example 1: Converting a character array to a numeric array of the corresponding ASCII values.

double('abc')
ans =
 97.00   98.00   99.00