Suppose I have a 3x3 array of values that include 0. I would like to know the number of occurrences/times per column that contains a value greater than 0 (in other words count the number of times a column does not include a zero).
What I think I need to do is:
a = [1 2 0; 2 0 0;3 1 1] count(i->(i>0), a[,:])
But this gives me
ERROR: syntax: unexpected ","
It is important for me to know the number of occurrences per column as this number is then used in a formula further on.
Any advice is appreciated.