Main Content


(Not recommended) Vectorize expression

vectorize is not recommended.



cdot = vectorize(c), where c is a character row vector or string scalar, inserts a . before any ^, *, or / in c. The result is a character row vector.

If c is an inline function object, then vectorize adds . to the function.

For information on vectorization in MATLAB®, see Vectorization.


Add Vector Operation

Create a string array that squares a variable, and change it to a vector operation.

c = "t^2"

c = 

cdot = vectorize(c)

cdot =


Input Arguments

collapse all

Input, specified as a character vector, string scalar, or inline function object.

Version History

Introduced before R2006a

See Also