create sparse upper triangular matrix with only 1s
Ältere Kommentare anzeigen
Hello. I want to create a sparse upper triangular with size 10^5x10^5. Is it possible?
m = triu(ones(10^5);
and
m = sparse(triu(ones(10^5));
exceed maximum array size preference. Thanks.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Sparse Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!