arunreddy
10/21/2015 - 2:32 AM

Replacing negative values with zeroes.

Replacing negative values with zeroes.

a = [1 -2 ; -3 4];
aPos = (a.>0.0).*a;
aInd = (a.<0.0).*a*-1;