Skip to content

Instantly share code, notes, and snippets.

@apow2
Last active January 11, 2021 10:59
Show Gist options
  • Save apow2/7a07d57fd470350b1c22c312c9e4b6c1 to your computer and use it in GitHub Desktop.
Save apow2/7a07d57fd470350b1c22c312c9e4b6c1 to your computer and use it in GitHub Desktop.
x = diag(ones(10000, 1)) % matrix with ones on diagonal and zero elsewhere
z = sparse(x) % compressed adjacency list representation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment