Handle case where [r,c,v]=find() returns row vectors