matthiasm@8: function E = isemptycell(C) matthiasm@8: % ISEMPTYCELL Apply the isempty function to each element of a cell array matthiasm@8: % E = isemptycell(C) matthiasm@8: % matthiasm@8: % This is equivalent to E = cellfun('isempty', C), matthiasm@8: % where cellfun is a function built-in to matlab version 5.3 or newer. matthiasm@8: matthiasm@8: if 0 % all(version('-release') >= 12) matthiasm@8: E = cellfun('isempty', C); matthiasm@8: else matthiasm@8: E = zeros(size(C)); matthiasm@8: for i=1:prod(size(C)) matthiasm@8: E(i) = isempty(C{i}); matthiasm@8: end matthiasm@8: E = logical(E); matthiasm@8: end