数组创建与索引
>> LC_type_IGBP_cell={'Evergreen Needleleaf Forests','Evergreen Broadleaf Forests','Deciduous Needleleaf Forests',...
'Deciduous Broadleaf Forests','Mixed Forests','Closed Shrublands',...
'Open Shrublands','Woody Savannas','Savannas',...
'Grasslands','Permanent Wetlands','Croplands',...
'Urban and Built-up Lands','Cropland/Natural Vegetation Mosaics','Permanent Snow and Ice',...
'Barren','Water Bodies','Unclassified'};
>> LC_type_IGBP_cell(1)
ans =
1×1 cell 数组
{'Evergreen Needleleaf Forests'}
>> LC_type_IGBP_cell{1}
ans =
'Evergreen Needleleaf Forests'
>> LC_type_IGBP_cell{end}
ans =
'Unclassified'
元组读取数据
问题描述
-
解决方案
对元胞的内容进行索引。当您使用花括号
{}
进行索引时,将得到指定元胞中包含的数据段。参考官方帮助文档:cell
向cell中添加和删除数据
参考博客:matlab在cell中添加和删除数据
- matlab在cell中删除数据
cell{end+1}=...