Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu

ONES matrix function

Description

ONES(A) returns a matrix with the same dimensions as matrix A with all elements equal to 1.

ONES(n) returns a square n × n matrix, consisting of all ones.

ONES(r,c) returns a r × c matrix, consisting of all ones.

Calculator

ONES(  

See also

Recommended book

Book cover

Matrix Algebra Useful for Statistics
Shayle R. Searle, Andre I. Khuri

Buy from Amazon

This book addresses matrix algebra that is useful in the statistical analysis of data as well as within statistics as a whole. The material is presented in an explanatory style rather than a formal theorem-proof format and is self-contained.