cellstr
Convert a character vector, s, to a cell array, R.
Syntax
R = cellstr(s)
Inputs
- s
- Type: string
Outputs
- R
- Type: cell
Examples
s = ['A'; 'B'; 'C'];
R = cellstr(s)
R =
ans =
{
[1,1] A
[2,1] B
[3,1] C
}
Discover new features and enhancements.
New to Activate? Learn the basics here.
Start using Activate with our interactive tutorials.
Learn about the features and functionality available in Activate.
Explore the Extended Definitions, OML Guides, Block Library, API Guide and Glossary.
PDF file with in-depth information on key topics in the User's Guide.
OpenMatrix is a mathematical scripting language.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Returns a string which consists of n spaces.
Convert a character vector, s, to a cell array, R.
Returns a string matrix whose elements are the input arguments, vertically concatenated.
Searches for pattern, pat, in the input, src, and returns true if pat is found.
Trims trailing whitespaces from strings, matrices and cell arrays. For matrices, trailing whitespaces are stripped from each row to the size of the longest string in the matrix, to make the length of each row consistent.
Returns a string containing the name of the functionf.
Returns true if the input, s, is a string and false otherwise.
Returns a boolean, logical matrix or cell array, whose value(s) are true if the corresponding elements of the input are letters and false, if otherwise.
Returns a boolean, logical matrix or cell array, whose value(s) are true if the corresponding elements of the input are whitespaces and false, if otherwise.
Returns true if the input, s, is a string and false otherwise.
Returns a string or cell array where each uppercase character of the input string, matrix or cell array is replaced by the corresponding lowercase character. Non-alphabetic characters in the input are not modified.
Writes the values of a 2D matrix, m, to a string, R.
Returns a string or a string array after converting the input x. Input x can be a scalar, complex number, or matrix. An optional argument, precision, can be used to format the output, R, by specifying the number of significant digits. Valid values of R are positive integers.
Returns the results after searching for the regular expression or pattern, pattern, in the input, s.
Returns the result after replacing the regular expression, pat with rep in the input, src.
Returns a formatted string, based on the format, strformat specified.
Returns result R after reading a formatted string s, specified by template t.
Returns a scalar, complex number or matrix, R, after converting the input s.
Returns the function handle corresponding to the input string argument s. If an optional second argument called global is given, only global functions are included in the scope of the lookup.
Returns a string matrix, R, whose elements are inputs, s, vertically concatenated. Strings that form the rows R are padded with spaces so that R is valid.
Returns a scalar, complex number or matrix, R, after converting the input s.
Concatenates inputs s, ... and returns the result, R, which is of type string or cell array.
Performs a case-sensitive comparison of x1 with x2. Returns 1 if the characters compared are identical and 0 otherwise.
Performs a case-insensitive comparison of x1 with x2. Returns 1 if the characters compared are identical and 0 otherwise.
Searches for all instances of the pattern pat in s. Returns a matrix, R, whose elements are indices of occurrences of pat in s.
Trims leading and trailing characters from strings.
Returns a string, R, which is the result of concatenating the elements of the cell array of strings, c, with each element separated by the delimiter delim. Delimiter delim is optional and if no value is specified, whitespace is used.
Performs a case-sensitive comparison of the first n characters of x1 with x2. Returns 1 if the characters compared are identical and 0 otherwise.
Performs a case-insensitive comparison of the first n characters of x1 with x2. Returns 1 if the characters compared are identical and 0 otherwise.
Searches and replaces all instances of the pattern pat in s with the new pattern newpat. The output R will be a string or a cell of strings, based on the type of s.
Tokenizes the string s with the given delimiter delim.
Splits the string s at the given delimiter delim and returns a cell array whose elements are the substrings of string s.
Trims leading and trailing whitespaces from strings, matrices and cell arrays. For matrices, leading and trailing whitespaces are stripped from each row to the size of the longest string in the matrix, to make the length of each row consistent.
Returns a string matrix whose elements are the input arguments, vertically concatenated.
Converts every character in the string, s, to its ASCII equivalent.
Returns a string or cell array where each uppercase character of the input string, matrix or cell array is replaced by the corresponding lowercase character. Non-alphabetic characters in the input are not modified.
Returns a string or cell array where each lowercase character of the input string, matrix or cell array is replaced by the corresponding uppercase character. Non-alphabetic characters in the input are not modified.
Returns a string or cell array where each lowercase character of the input string, matrix or cell array is replaced by the corresponding uppercase character. Non-alphabetic characters in the input are not modified.
Describes all of the blocks in the installed Activate library.
Provides information about developing and simulating models through the Activate Application Program Interface.
Key terms associated with the software.
You've got questions? We've got answers!
Explore the Extended Definitions, OML Guides, Block Library, API Guide and Glossary.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Convert a character vector, s, to a cell array, R.
Convert a character vector, s, to a cell array, R.
R = cellstr(s)
s = ['A'; 'B'; 'C'];
R = cellstr(s)
R =
ans =
{
[1,1] A
[2,1] B
[3,1] C
}
© 2022 Altair Engineering, Inc. All Rights Reserved.
Intellectual Property Rights Notice | Technical Support | Cookie Consent