accumarray error: Index into matrix must be positive
Show older comments
G=[0 1 ; 0 2 ; 1 2];
adj=accumarray(G,1,[],[],0,true);
error: Index into matrix must be positive.
Accepted Answer
More Answers (2)
Muhammad Usman Saleem
on 4 Apr 2016
0 votes
Chad Greene
on 4 Apr 2016
0 votes
The zeros in G are not positive.
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!