Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Strings > char

char

char 関数

呼び出し手順

y = char(x)

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

引数

x

文字列配列のセル, またはアスキーコードの配列

st1,st2,st3

文字列配列

y:

文字列(列)ベクトル

説明

入力引数が一つの場合 :

文字列配列xのセルを指定すると, この関数は 文字列セルの要素を行とする文字列ベクトル y を返します.

アスキーコードxの配列を指定すると, この関数はそのアスキーコードに対応する文字列の配列 y を返します. xの次元が [n1, n2, n3, n4,...]の場合, 返り値は2番目の次元以外は入力値と同じ大きさを有します. すなわち,yの次元は, [n1, n3, n4,...]となります.

入力引数が1より多い場合 :

文字列配列 st1,st2,st3,...を指定すると, この関数は, st1,st2,st3,...を結合した要素が行となる 文字列のベクトルを返します. ベクトル y においては, 文字列stiの末尾を空白で埋めることにより, stiの最長のものと同じ長さにしています.

//Example with a hypermatrix of ASCII codes :
x=matrix(61:84, [4,2,3]);
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)

参照

  • ascii — 文字列をアスキー変換する
  • asciimat — 文字列行列アスキー変換
Report an issue
<< blanks Strings convstr >>

Copyright (c) 2022-2023 (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:
Tue Feb 14 15:10:32 CET 2017