Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个单元格数组,其中一些单元格是空的,有些是数字,有些是字符串和字符。我想找出哪些是空的-有没有更好的方法,然后是使用以下公式的双循环:
isempty(cell_array{i,j})
就在这里:
emptyList = cellfun(@isempty, yourCellArrayHere);
它更紧凑,和 Matlab 类似的风格。在实践中,由于for循环的 JIT 优化,不能保证更快。
for