matlab中的any()命令是什么意思
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 20:27:55
![matlab中的any()命令是什么意思](/uploads/image/z/5532590-38-0.jpg?t=matlab%E4%B8%AD%E7%9A%84any%28%29%E5%91%BD%E4%BB%A4%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D)
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.
是这个么?你自己看看吧