matlab2014a中help与参考页翻译 and

来源:互联网 发布:sql删除表数据语句 编辑:程序博客网 时间:2024/06/06 07:17
镇场诗:慈心积善融学习,技术誓为大家学。善心速造多好事,前人栽树后乘凉。我今于此写经验,愿见文者得启发。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

and - Find logical AND
and – 逻辑与
    This MATLAB function performs a logical AND of all input arrays A, B, etc., and returns an array containing elements set to either logical 1 (true) or logical 0(false).
    这个MATLAB函数对输入数组A,B,。。。。进行逻辑与运算。返回一个数组,这个数组包含的元素要么是逻辑1,要么是逻辑0。


Syntax   用法
A & B & ...
and(A, B)
Description 描述
A & B & ... performs a logical AND of all input arrays A, B, etc., and returns an array containing elements set to either logical 1 (true) or logical 0 (false). An element of the output array is set to 1 if all input arrays contain a nonzero element at that same array location. Otherwise, that element is set to 0.
A & B & ...对输入数组A,B,。。。进行逻辑与运算,并且返回一个元素要么是逻辑0,要么是逻辑1的数组。如果输出数组的元素被设为1,那么证明所有输入数组在相同位置均为非零元素。否则,将会被设为0.


Each input of the expression can be an array or can be a scalar value. All nonscalar input arrays must have equal dimensions. If one or more inputs are an array, then the output is an array of the same dimensions. If all inputs are scalar, then the output is scalar.
每一个输入的表达式可以是一个数组也可以是一个标量。所有不是标量的输入数组必须具有相同的维度。如果一个或者多个输入是数组,那么输出是一个与输入具有相同维度的数组。如果全部的输入是标量,那么输出也是标量。


If the expression contains both scalar and nonscalar inputs, then each scalar input is treated as if it were an array having the same dimensions as the other input arrays. In other words, if input A is a 3-by-5 matrix and input B is the number 1, then B is treated as if it were a 3-by-5 matrix of ones.
如果表达式既包含标量又包含非标量的输入,那么每一个标量输入将会被当做与其他输入数组相同维度的数组对待。换句话说,如果A是一个三行五列的矩阵,B是一个数字1,那么B将会当成一个三行五列全都是1的矩阵对待。


and(A, B) is called for the syntax A & B when either A or B is an object.
当A与B是对象时,在语法规则上,and(a,b)被叫做A与B。

Note   The symbols & and && perform different operations in the MATLAB® software. The element-wise AND operator described here is &. The short-circuit AND operator is &&.
笔记 在MATLAB中,符号&和&&是不同的运算。普通元素之间的与运算是&,&&具有短路运算的功能。(很好用)




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

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


0 0
原创粉丝点击