Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.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 Help >> Strings > char

char

converts in a character array

Calling Sequence

y = char(x)
y = char(st1, st2, st3,...)

Arguments

x

a cell array of strings, or an array of ASCII codes.

st1, st2, st3

arrays of strings.

y

a vector of strings (column).

Description

One input argument :

Given a cell of array of strings x, this function returns a vector of strings y in which the rows are the concatenated components of corresponding rows of the cell array of strings.

Given an array of ASCII codes x, this function returns a array of strings y corresponding into ASCII codes. If dimensions of x are [n1, n2, n3, n4,...], then returned value has same size as input value except second dimension, i.e. the dimensions of y are [n1, n3, n4,...].

More than one input argument :

Given arrays of strings st1, st2, st3,..., this function returns a vector of strings in which the rows are the concatenated components of corresponding rows of st1, st2, st3,.... In the vector y all strings sti are completed by blanks to have the same length as the max length of sti.

Examples

//Example with a hypermatrix of ASCII codes :
x=hypermat([4,2,3],61:84);
y=char(x)
size(x)
size(y)

//Example with more than one argument :
st1="zeros";
st2=["one","two"];
st3=["three"];
y=char(st1,st2,st3)
size(y)

//all strings rows are completed by 'blanks' to have the same length : 6
length(y)

See Also

  • ascii — string ASCII conversions
  • asciimat — string matrix ASCII conversions
Report an issue
<< blanks Strings convstr >>

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:
Fri Apr 11 14:06:54 CEST 2014