I am trying to get the number of positive numbers in a matrix. The matrix has numbers such as these:
35.0558 30.1323 -24.0061 -7.0385 -83.3891
I cannot use a loop and I approached so I use a regexp and if its positive it should give 1 otherwise 0 and the sum up the 1s and get the total number, but currently at the moment I am getting only [] ....
Here is what I have so far:
X = regexp(cellstr(num2str(reshape(int8(rint),1,[])'))','^[1-9][0-9]*$')
any ideas what's going wrong ? I think the regexp is alright...