Hi everyone, I would like to do the following. Given matrix m and matrix n, I would like to compute mn[i,,j]= m[i,,j] + n[i,,j] if either of these elements is 0. (In other words, whichever number is nonzero.) Else I want mn[i,,j]=(m[i,,j] + n[i,,j])/2 I need a fast method. Thanks very much for any help. Bill Simpson