a convenient type to record lots of value in MatLab -- cell matrix

a convenient type to record lots of value in MatLab -- cell matrix


How to create a cell matrix in MatLab?

Way1:
cell method

Way2:
{}


Type Conversion.

Remember that when type t1 is converted to type t2 (t1->t2),
the keyword is <t1>2<t2>

num2cell
number array to cell array.

char2cell 
char array to cell

table2cell
table to cell array.

struct2cell
structure array to cell array.

mat2cell
array to cell array whose cells contains subarrays.

cell2num
cell array to number array

cell2char
cell array to char array.

cell2table
cell array to table.

cell2struct
cell array to struct array.

cell2mat
cell array to ordinary array of underlying data type.

How to check a type of variable is a cell matrix?
iscell() method

How to apply each cell in cell array?
cellfun method

[syntax]

cellfun(funcName,arg1)
cellfunc(funcName func,arg1)

You can declare a anomynous function within the cellfunc method.

more details on:

Comments

Popular posts from this blog

diagonal matrix--diag

Anonymous Function in MatLab