用cell函数创建元胞数组
用cell函数创建元胞数组,创建的数组为空元胞。cell函数创建空元胞数组的主要目的是为数组预先分配连续的存储空间,节约内存占用,提高执行效率。
>> a=cell(1)
a =
{[]}
>> b=cell(1,2)
b =
[] []
>> c=cell(3,3)
c =
[] [] []
[] [] []
[] [] []
>> d=cell(2,2,2)
d(:,:,1) =
[] []
[] []
d(:,:,2) =
[] []
[] []
>> whos
Name Size Bytes Class Attributes
a 1x1 4 cell
ans 1x1 1logical
b 1x2 8 cell
c 3x3 36 cell
d 2x2x2 32 cell
赞!!!!
赞!!!!
赞!!!!
赞!!!!
赞!!!!
赞!!!!
赞!!!!
赞!!!!
赞!!!!
页:
[1]
2