matlab中的any()命令是什么意思

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 02:36:23
matlab中的any()命令是什么意思

matlab中的any()命令是什么意思
matlab中的any()命令是什么意思

matlab中的any()命令是什么意思
any -
Determine whether any array elements are nonzero
Syntax
B = any(A)
B = any(A,dim)
Description
B = any(A) tests whether any of the elements along various dimensions of an array is a nonzero number or is logical 1 (true).The any function ignores entries that are NaN (Not a Number).
If A is empty,any(A) returns logical 0 (false).
If A is a vector,any(A) returns logical 1 (true) if any of the elements of A is a nonzero number or is logical 1 (true),and returns logical 0 (false) if all the elements are zero.
If A is a matrix,any(A) treats the columns of A as vectors,returning a row vector of logical 1's and 0's.
If A is a multidimensional array,any(A) treats the values along the first nonsingleton dimension as vectors,returning a logical condition for each vector.
B = any(A,dim) tests along the dimension of A specified by scalar dim.
是这个么?你自己看看吧