true
Logical array of all true.
Syntax
Section titled “Syntax”A = trueA = true(n)A = true(d1, d2, ...)Description
Section titled “Description”Creates a logical (boolean) array of all true. With no arguments, returns scalar true. With one integer, returns an n×n square; with multiple, an N-dimensional array.
Examples
Section titled “Examples”true % logical scalar truetrue(3) % 3×3 of truetrue(1, 5) % row vector of five trues