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

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ヘルプ >> Data Structures > cells > cell

cell

空行列のセル配列を作成する.

呼び出し手順

c=cell()
c=cell(m1)
c=cell(m1, m2)
c=cell(m1, m2, ..., mn)
c=cell(x)

パラメータ

x

作成するセル配列の次元のベクトル.

m1, m2,..

作成するセルの次元.

説明

空行列のセルを生成,返します.

cell()

空行列の (0,0) セル配列を返します.

cell(m1)

(m1,m1) は空行列のセル配列を返します.

cell(m1,m2)

(m1,m2)は空行列のセル配列を返します.

cell(m1,m2,..,mn)

(m1,m2,..,mn) は空行列のセル配列を作成します.

cell(x)

最初の次元がx(1), 2番目の次元がx(2), ...となる 空行列のセル配列を返します.

注意

cell(x)xと同じ大きさになりません.

cell()cell(0)に等しくなりです.

A がセル配列の場合, A{m1, m2, ..., mn}により Aの要素の内容にアクセスすることができます. 式 A(1,1) = zeros(2,2) は有効ではなく, A{1,1} = zeros(2,2)が正しい構文となります.

a = cell(3)
b = cell(3,1)
c = cell([2,3,4])

// Assigning cell entries
b = cell(3,1);

// Assigning the first element of b using {}
b{1} = 1:3

// Assigning the second element of b using {}
b{2} = 'Scilab'

// Assigning the third element of b using the 'entries' field
b{3} = poly(1:3,'s')

// Assigning sub-cells
X = cell(3,2);
X{:,1} = b

// Extracting a sub-cell: result is a cell
b{1}
b{1:2}

// Extracting a sub-cell value: result is an array
b{1}

// Dimensions of b as a double value
size(b)

参照

  • eye — 単位行列
  • ones — 要素が1の行列
  • zeros — ゼロからなる行列
  • iscell — 変数がセル配列かどうかを調べる

History

VersionDescription
6.0.0

Fields "entries" and "dims" do not exist anymore. To assign or extract an element, use {}.

Report an issue
<< cells cells cell2mat >>

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:
Mon Feb 12 23:12:41 CET 2018