【发布时间】:2014-06-28 17:05:21
【问题描述】:
我正在使用 for 循环中的单元格数组,但是我想在运行时在指定条件下删除一个单元格,并希望其余的循环迭代保持稳定。当从单元格数组中删除任何单元格时,循环条件应该随着迭代的变化而重新格式化。有什么建议/可能性吗?
错误:
Index exceeds matrix dimensions.
Error in myCode (line 33)
if (CellArray2{jj}(ii,:) ~= 0)
我的代码:
while ii<=1000
for jj=1:10
if (CellArray2{jj}(ii,:) ~= 0)
CellArray1(jj) = [];
CellArray2(jj) = [];
end
end
end
【问题讨论】:
标签: matlab loops for-loop cell