MATLAB: Remove row of cell array that contains 0.

MATLAB

For example, I have a = [{0} {0} {0}; {1} {3} {4}; {0} {0} {0}]. I would like to remove the row that contains all of zero so that I can have the result a = [{1} {3} {4}]. I try this but it not work.
a(all(a == 0, 2), :) = []
what I am missing? Thanks.

Best Answer

out = a(all(cellfun(@(x)x~=0,a),2),:);
OR
out = a(all(cell2mat(a) ~= 0,2),:);