I tried to divide two large matrices DLand PL of size 100,000 x 5 each and they look like this,
DL=
and
PL=
By using conditional function:
Spread1[DL_, PL_] := SparseArray[ {i_, j_} /; PL[[i, j]] != 0 :> 100000 DL[[i, j]]/PL[[i, j]], {1000, 5}]
test = Spread1[DL, PL];
MatrixForm[test]
and then I get result as shown, but why do I get those messages and some of the resulting test matrix elements say ComplexInfinity? Not sure if I should ignore those messages as all zero elements are aligned?


!=0test in there. Shouldn't that take care of it? – tkott Nov 15 '12 at 20:14