How to count the number of matches in a matrix in Octave?

I have a matrix of integer columns like [1;4;3;2;3].

How to count the number 3 (there are two)?

+5
source share
1 answer

Number of trois

sum([1;4;3;2;3] == 3)
+16
source

All Articles