Ones
Description
Ones returns a matrix of all ones with the desired shape, which is useful for linear algebra applications. This is a helper function used in a variety of other CLS-Stats regression functions.
Syntax
Ones([numrows=1], [numcols=1]) where numrows and numcols are the desired number of rows and columns in the output.
Example

Source Code
Ones = LAMBDA([numrows], [numcols], //input rows and columns
LET(
numrows, IF(ISOMITTED(numrows), 1, numrows), // default r=1
numcols, IF(ISOMITTED(numcols), 1, numcols), // default c=1
EXPAND(1, numrows, numcols, 1)
)
);