MATLAB: How to count the element of a cell

cell

hello all,,
i wanna ask u about how to count the element of a cell,,
i mean like this
example :
[1] [4] [13] 'low'
[7] [7] [16] 'high'
[7] [4] [25] 'high'
in the picture above we can see any two data that have category 'high' and one data has category 'low'
i've trouble how to count that category so the result like this
high : 2
low : 1
in my case, i want if amount of data that have category 'high' is more than amount of data that have category 'low' so the result is "new data category is high"
can anyone help me?
please 🙂
sorry for my bad english 🙂

Best Answer

categories=CellArray(:,4);
if nnz(ismember(categories,'high')) > nnz(ismember(categories,'low'))
disp 'new data category is high'
end