- Scilab help
- Strings
- ascii
- blanks
- char
- convstr
- emptystr
- eval
- evstr
- grep
- isalphanum
- isascii
- isdigit
- isletter
- isnum
- justify
- length
- part
- regexp
- sci2exp
- strcat
- strchr
- strcmp
- strcmpi
- strcspn
- strindex
- string
- strings
- stripblanks
- strncpy
- strrchr
- strrev
- strsplit
- strspn
- strstr
- strsubst
- strtod
- strtok
- tokenpos
- tokens
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
string
conversion to string
Calling Sequence
string(x) [out, in, text] = string(x)
Arguments
- x
Boolean, complex, real, integer, polynomial matrix, implicit size, library or function
Description
converts a matrix into a matrix of strings.
If x
is a function [out, in, text] =
string(x)
returns three vectors strings : out
is the vector of output variables, in
is the vector of
input variables, and text
is the (column) vector of the
source code of the function.
If x
is a lib
variable
(library), text is a character string column vector. The first element
contains the path of library file and the other the name of functions it
defines.
Character strings are defined as 'string'
(between quotes) or "string"
(between doublequotes);
matrices of strings are defined as usual constant matrices.
Concatenation of strings is made by the +
operation.
For complex, real, integer, polynomial matrix
string
output is managed by format function (see examples).
Examples
string(rand(2, 2)) deff("y = mymacro(x)", "y = x + 1") [out, in, text] = string(mymacro) x = 123.356; disp("Result is " + string(x)); disp("/" + string(~%t) + "/"); disp("/" + string(%i+1) + "/"); disp("/" + string(int16(-123)) + "/"); disp("/" + string(1 + %s + %s^3) + "/"); string(corelib) v = format(); disp(string(%pi)) format(24); disp(string(%pi)) format(v(2)) string(1:4:$)
See Also
- part — extraction of strings
- length — length of object
- quote — (') transpose operator, string delimiter
- evstr — evaluation of expressions
- execstr — execute Scilab code in strings
- strsubst — substitute a character string by another in a character string.
- strcat — concatenate character strings
- strindex — search position of a character string in an other string.
- sci2exp — converts an expression to a string
- format — number printing and display format
History
Version | Description |
5.4.0 | implicit size type managed as input argument. |
Report an issue | ||
<< strindex | Strings | strings >> |