Tuesday, August 4, 2009

False array

Syntax

*

false
false(n)
false(m,n)
false(m,n,p,...)
false(size(A))

Description

false is shorthand for logical(0).

false(n) is an n-by-n matrix of logical zeros.

false(m,n) or false([m,n]) is an m-by-n matrix of logical zeros.

false(m,n,p,...) or false([m n p ...]) is an m-by-n-by-p-by-... array of logical zeros.

false(size(A)) is an array of logical zeros that is the same size as array A.

Remarks

false(n) is much faster and more memory efficient than logical(zeros(n)).

No comments:

Post a Comment