In a 2 dimensional list like the one below, is there any way, using the Count function to count all rows where first column equals 1, second equals 2 and third does not equal 3?
I tried Count[Data,{1,2,_?(#!=3&)}] – but it doesn’t work :(. Am I doing something wrong using patterns?
1 2 3
2 2 3
1 1 1
1 2 1
1 3 2
3 3 3
3 2 1
1 2 2
Many thanks,
m
Yes, I think your pattern is awry. Try
Count[data, {1, 2, x_ /; x != 3}]