Thu 26 Sep 2013 05:09:57 PM UTC, comment #1:
Confirmed. As a workaround, if you convert both inputs to logical type, then bsxfun works.
This isn't that bad because cliques will still stay as a sparse bool matrix. v is small enough that there probably isn't much point in converting it to a sparse matrix but you could also do "sparse (logical (v))" and bsxfun will still work.
|
Sun 22 Sep 2013 10:40:25 PM UTC, original submission:
When attempting to use bsxfun to @and a matrix with a vector
cliques = sparse([1,1,2,2],[1,2,2,3],[1,1,1,1],2,5)
v = [1,0,1,0,1]
bsxfun(@and,cliques,v)
I get
error: concatenation operator not implemented for '<unknown type>' by 'sparse matrix' operations
|