Concatenating strings and scalars / arrays
- June 9, 2012
- 3 replies
- 14062 views
The attached worksheet arose out of a need to generate a sequence of alphanumeric strings. There are 3 functions, Str, Concat and concatenate.
Str takes a single argument, which can be a string, scalar or (possibly nested) array, range definition or range variable, and converts all of its elements into a string or string array.
Concat takes a pair of inputs, which can be strings, scalars or (possibly nested) arrays, converts all elements into strings and concatenates them.
concatenate takes a single argument, a list (vector) of strings, scalars or vectors, converts all elements into strings and concatenates them.
In both cases, the arrays must be conformable (ie, have the same shape).
Note the conversion of the range variable in Concat, however!
Stuart





