Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 6 years ago

Juanjo gravatar image

You can use ones_matrix, which returns a matrix with all entries equal to 1. So, to build, say, an 1000×1000 matrix with all entries being 1, you can simply write -ones_matrix(1000,1000).

click to hide/show revision 2
No.2 Revision

You As another alternative, you can use ones_matrix, which returns a matrix with all entries equal to 1. So, to build, say, an 1000×1000 matrix with all entries being 1, you can simply write -ones_matrix(1000,1000).