I'm very new to matlab, I have a table with several columns and almost 10,000 rows, each column contains a different set of data. I need count the number of cells in column 2 that have the number 2 in them (the cells contain numbers 1-9).
So far I have
month=tab(tab(:,2)>1 & tab(:,2)<3 ,:);
res{2}=numel(month);
where res{2} is question number 2
the answer should be 2000, but it's coming in at 11900. Any help is greatly appreciated!
Best Answer