char

  • char(A1,...,An)
    1. When Ai is a string array, cell array, or categorical array, only one argument is allowed
      • Converts A1 to a char array
    2. When Ai is a char array
      • Whitespace is not trimmed
      • Inputs need not have the same length; each row is right-padded with spaces to match the longest one
    3. When Ai is a numeric array
      • Converts the ASCII code points to characters
      • Then concatenates them vertically as in case 2
    4. When Ai is an empty array
      • Padded with spaces as in case 2