# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# char

Convert symbolic objects to character vectors

## Syntax

```char(A) ```

## Description

`char(A)` converts a symbolic scalar or a symbolic array to a character vector.

## Input Arguments

 `A` Symbolic scalar or symbolic array.

## Examples

Convert symbolic expressions to character vectors, and then concatenate the character vectors:

```syms x y = char(x^3 + x^2 + 2*x - 1); name = [y, ' represents a polynomial expression']```
```name = '2*x + x^2 + x^3 - 1 represents a polynomial expression'```

Note that `char` changes the order of the terms in the resulting character vector.

Convert a symbolic matrix to a character vector:

```A = sym(hilb(3)) char(A)```
```A = [ 1, 1/2, 1/3] [ 1/2, 1/3, 1/4] [ 1/3, 1/4, 1/5] ans = 'matrix([[1, 1/2, 1/3], [1/2, 1/3, 1/4], [1/3, 1/4, 1/5]])'```

## Tips

• `char` can change term ordering in an expression.