MATLAB: How to count negative and postive values in a matrix

matrixmatrix manipulation

Sir, how can i get the mean and standard deviation and total numbers of negative values and similarly for positive values in a matrix A(i,j).Please help

Best Answer

s=sign(A)
ipositif=sum(s(:)==1)
inegatif=sum(s(:)==-1)
Related Question