true
Logical true.
📝Syntax
true
l = true(n)
l = true(sz)
l = true(n, m, ..., k)
l = true(n, m, 'like', sp)
📥Input Arguments
Parameter Description
n a integer value.
sz a size vector.
n, m, ..., k a n -by- m - ... -by- k array to indicate size.
sp a sparse or array.
📤Output Arguments
Parameter Description
l a logical value: true.
📄Description

true build a matrix of true.

💡Examples
true
true(4)
true(4, 1, 4)
L = logical(sparse(1, 2))
L2 = true(3,'like', L);
🔗See Also
false
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub