MATLAB: Frequency determination countfrequencyhistc Hi I have a matrix as follows: A=[1 2 3; 2 3 2; 1 2 3] I need to determine the frequency of the matrix value. i.e. the frequency of 1 is 2 the frequency of 2 is 4 the frequency of 3 is 3 How to do this easily. Best Answer c = histc(A(:),unique(A)) Related SolutionsMATLAB: Finding the Frequency of Unique Values A = [ 1 1 4 3 3 3 3 2 4 1 ][ii,jj,kk]=unique(A)freq=accumarray(kk,1)out=[ii' freq]%orfreq=hist(A,1:4) MATLAB: Natural number determination A == round(A)That will give a 1 for integers. You can add a test for positiveness if you want it. Related QuestionHow to count frequency of non zero elements col wiseComplex number determinationHistc and bin-width determinationColumn operation based on frequency of element in a mtrixPearson correlation coefficient determination
Best Answer