新手请教:有一元胞数组,希望完成如下操作:当图中第三列数据为-9999时,删除这一单元。
如modisdata{1,1}(1,3)数值为-9999,则删除modisdata{1,1}中的所有内容。求问如何实现它

 Réponse acceptée

0 votes

data{1,1} = {1,3,-9999};
data{1,2} = {2,3,4};
kk = 1;
for ii = 1:length(data)
if ~ismember(-9999,cell2mat(data{1,ii}))
dataR{1,kk} = data{1,ii};
kk = kk+1;
end
end

Plus de réponses (0)

Catégories

En savoir plus sur Electrical Block Libraries dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!