MATLAB: Need help using the count function

arraycounthelpMATLABmatrixstring

hi lets say i have an array 4×5 and it is compossed of 0's and 1's
as so a=[ 1 0 1 0 1;
1 1 0 1 1;
0 1 0 1 0;
1 0 1 0 1;]
and i want to count the zeros in each collumn
so im writing count(a,0) but i am getting erros ive read the material but dont understand what the string array means

Best Answer

sum(a == 0, 1)
count() is primarily a method for processing string() datatype.