Greetings Matlab Community,
I've manage to sum up the occurrence of number 2 of the entire matrix by using this,
chromo = [1 1 2 4 6 1 ; 2 1 3 5 7 2];sum(chromo(:) == 2)
How do i sum up the occurrence of number 2 in just a row in the matrix and not the entire matrix?
Best Answer