I want to count the number of observations that are greater than say a 100x4 matrix. The code will be used in a loop where the rows/columns of the matrix will be indexed i.e.loop goes over each element of the matrix. In each run of the loop, I want to count elements greater than 1 per row.
I tried the following code, it did not help.
Code: Select all
mat1(!i,1) = @sum(matname(!i,!j)>1)