Cells

Cells – matrix of nsp objects data type

Calling sequence

A={a11, a12, ..., a1n;  
   a21, a22, ..., a2n;  
   ...  
   am1, am2, ...; amn}

Parameters

Description
The Cells data type is used to create matrix of nsp objects. In the current implementation, cell arrays are two dimensional arrays.

column cell vectors are considered as m x 1 matrices and row cell vectors as 1 x n matrices.

Internally Cells type are stored by default as a unidimensional array of Objects, It is therefore always possible to access elements with one indice assuming a column order storage.

Operations on Cells

Cells methods

Methods from the matint interface

Extraction, insertion, deletion
For Cells data type, operations performed with {.} operate on the stored objects whereas operation performes with (.) operate on Cells data type. For example, if C={5,6}, C(1,1) will return a 1x1 Cells whereas C{1,1} will return the numeric matrix 5.

In the sequel, I and J are matrices giving indices. Thus, I and J are numeric or boolean matrices the can also be set to : in that case they stand for the whole element, or row ,or column indices of the matrix.

Empty cells
Empty cells are Cells with zero rows or zero columns. Operations with empty cells are compatible with linear algebra operations.

For loop control
Let A be a Cells object :

     for col=A  
       ....  
     end

is a loop with size(A,2) iterations, the loop variable col being set to the ith column of A at the i-th iteration.

Some functions

Examples

See also

Authors jpc