matlab2014a中help与参考页翻译 all

来源:互联网 发布:新浪微博登陆网络异常 编辑:程序博客网 时间:2024/06/02 03:26
镇场诗:慈心积善融学习,技术誓为大家学。善心速造多好事,前人栽树后乘凉。我今于此写经验,愿见文者得启发。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

>> help all
all - Determine if all array elements are nonzero or true
all – 判定是否数组的全部元素是 非0或者真。
This MATLAB function tests along the first array dimension of A whose size does not equal 1, and determines if the elements are all nonzero or logical 1 (true).
这个MATLAB函数从第一维开始测试一个数组,这个数组的维度可以不为1,判断是否数组中的所有元素均是非0或者逻辑1.

Syntax 句法规则
B = all(A)
B = all(A,dim)

Description 描述
B = all(A) tests along the first array dimension of A whose size does not equal 1, and determines if the elements are all nonzero or logical 1 (true). In practice, all is a natural extension of the logical AND operator.
这个MATLAB函数测试一个数组,这个数组的维度可以不为1,判断是否数组中的所有元素均是非0或者逻辑1.在实践中,all函数是一个逻辑与运算的自然扩展。



If A is a vector, then all(A) returns logical 1 (true) if all the elements are nonzero and returns logical 0 (false) if one or more elements are zero.
如果A是一个向量,而且所有的元素都是非0的,那么all(A)返回逻辑1。如果有一个或者更多的元素是0,那么返回逻辑0.

If A is a nonempty, nonvector matrix, then all(A) treats the columns of A as vectors and returns a row vector of logical 1s and 0s.
如果A是一个不空的矩阵,那么all(a)按照向量的方式对待A的列,之后返回一个行向量,这个行向量有逻辑1或逻辑0.

If A is an empty 0-by-0 matrix, then all(A) returns logical 1 (true).
如果是一个空,即0行0列的矩阵,那么all(A)返回逻辑1.

If A is a multidimensional array, then all(A) acts along the first array dimension whose size does not equal 1 and returns an array of logical values. The size of this dimension becomes 1, while the sizes of all other dimensions remain the same.
如果A 是一个多维度数组,那么all(a)会对每一个维度按照一维数组的方式进行判断,并返回每一个维度的逻辑值,如果每个维度都返回1,那么all(a)只返回一个1。



B = all(A,dim) tests elements along dimension dim. The dim input is a positive integer scalar.

这个测试在指定维度的元素们。Dim变量是一个正整数标量。




///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

感恩帮助过我的人。博客的精髓在技术部分,更在镇场一诗。
我是一个新手,翻译还有许多不完善的地方,请您看翻译的时候多多思考。
MATLAB是一个优秀的软件,值得学习。如果您有一些不会的知识,咱们可以相互讨论。
如果您认为翻译可以有改进的地方,有错误的地方,请留下评论,我会处理的。
注:如果我的博文无意中侵犯了您的权益,请告知。看到您的告知后,我将及时作出处理。


0 0
原创粉丝点击