MATLAB2014a中help与参考页中文翻译(用于学习) or, |



慈心积善,做大证明。口中言语,光亮人心。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

or, |
Find logical OR
逻辑或

Syntax 句法规则
A | B | ...
or(A, B)


Description 描述
A | B | ... performs a logical OR 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 any input arrays contain a nonzero element at that same array location. Otherwise, that element is set to 0.
A | B | ...进行的是,对输入数组A,B,。。。的逻辑或运算,并返回一个数组,这个数组的元素要么是逻辑1要么是逻辑0.在输出的数组当中,如果元素被设为1,那么证明所有的输入数组中在该位置至少有一个非0的元素。否则,输出数组的元素就是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来对待。



or(A, B) is called for the syntax A | B when either A or B is an object.


Note   The symbols | and || perform different operations in a MATLAB® application. The element-wise OR operator described here is |. The short-circuit OR operator is ||.
笔记 符号|和||在MATLAB中是不同的。|是每个输入都计算,
||则应用了短路求法。


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


翻译matlab 借助了翻译软件和实践时候的经验,愿所有看了这篇翻译的人能得到一些启示。

因为是为了帮助新手入门,所以我努力以人为本,说新手听得懂的语言,绝不一一对译。n(*≧▽≦*)n
如果我的翻译有错误,请指正。我会不断地进步并更新改进翻译的。请务必不吝赐教。在下感激不尽。

感恩众生与使用的软件,金山词霸与microsoft word。

注:此文仅用作科研学习使用。如果我侵犯了您的权益,请告知。看到您的告知后,我将及时作出处理。
此文为原创,未经同意不得转载。所以转载到其他网站前,请询问在下。


你可能感兴趣的:(matlab,中文翻译,新手入门)