Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Strings > string

string

conversion to string

Calling Sequence

string(x)
[out,in,text]=string(x)

Arguments

x

Boolean, complex, real, integer, polynomial matrix, 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, 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.

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)+'/')
<< strindex Strings strings >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:46 CET 2011