Scilab 6.1.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ヘルプ >> 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()

cell(m1)

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

cell(m1,m2)

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

cell(m1,m2,..,mn)

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

cell(x)

### 注意

`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

 Version Description 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:Tue Feb 25 08:53:23 CET 2020