spones sparse · scripts/sparse/spones.m R = spones (S) -- sparse matrix with a 1 wherever S is nonzero.