MATLAB Function Reference | Search  Help Desk |
cell | Examples See Also |
c = cell(n) c = cell(m,n) c = cell([m n]) c = cell(m,n,p,...) c = cell([m n p ...]) c = cell(size(A))
c = cell(n)
creates an n
-by-n
cell array of empty matrices. An error message appears if n
is not a scalar.
c = cell(m,n) or c = cell([m,n])
creates an m
-by-n
cell array of empty matrices. Arguments m
and n
must be scalars.
c = cell(m,n,p,...)
or c = cell([m n p ...])
creates an m
-by-n
-by
-p
-...
cell array of empty matrices. Arguments m
, n
, p
,...
must be scalars.
c = cell(size(A))
creates a cell array the same size as A
containing all empty matrices.
A = ones(2,2) A = 1 1 1 1 c = cell(size(A)) c = [] [] [] []
ones
Create an array of all ones
rand
Uniformly distributed random numbers and arrays
randn
Normally distributed random numbers and arrays
zeros
Create an array of all zeros