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



慈心积善,为有缘人做大证明。口中言语,光亮世间人心。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Find
find - Find indices and values of nonzero elements
find –找到非0元素的值与下标。
This MATLAB function locates all nonzero elements of array X, and returns the linear indices of those elements in vector ind.
这个MATLAB函数查找数组X中的全部非0元素的位置,并返回所查找元素的线性索引。

Find 参考页
ind = find(X) locates all nonzero elements of array X, and returns the linear indices of those elements in vector ind. If X is a row vector, then ind is a row vector; otherwise, ind is a column vector. If X contains no nonzero elements or is an empty array, then ind is an empty array.
Ind=find(x)查找数组X中全部的非零元素,并返回这些非零元素在数组中的线性索引。如果X是一个行向量,那么ind也是一个行向量。
否则,ind是一个列向量。如果数组X包含的全都是0元素,或者是一个空数组,那么ind 就是一个空数组。

ind = find(X, k) or ind = find(X, k, 'first') returns at most the first k indices corresponding to the nonzero entries of X. k must be a positive integer, but it can be of any numeric data type.
ind = find(X, k) or ind = find(X, k, 'first'),X数组中的元素,从头开始查找,查找到第一个值为K的元素时,返回索引值。
K必须是正整数,,但是它也可是任意的数字数据类型。

ind = find(X, k, 'last') returns at most the last k indices corresponding to the nonzero entries of X.
ind = find(X, k, 'last') ,返回一个索引值。在X中查找,从后往前找,找到第一个值为K的元素,并返回索引值。

[row,col] = find(X, ...) returns the row and column indices of the nonzero entries in the matrix X. This syntax is especially useful when working with sparse matrices. If X is an N-dimensional array with N > 2, col contains linear indices for the columns. For example, for a 5-by-7-by-3 array X with a nonzero element at X(4,2,3), find returns 4 in row and 16 in col. That is, (7 columns in page 1) + (7 columns in page 2) + (2 columns in page 3) = 16.
[row,col] = find(X, ...),返回矩阵X中的非0元素的行,列的索引值。这个句法在处理稀疏矩阵中很有帮助。如果X是一个N维的数组,这个N大于2的,那么col中包含了许多列。举个例子,一个5行7列3页的数组X中有一个非0元素在4行2列3页,那么find函数就返回 row=4 col=16。这表明,第一页中的7列,加上第二页中的7列加上第三页中的2列=16.

[row,col,v] = find(X, ...) returns a column or row vector v of the nonzero entries in X, as well as row and column indices. If X is a logical expression, then v is a logical array. Output v contains the non-zero elements of the logical array obtained by evaluating the expression X.
[row,col,v] = find(X, ...)返回了一个向量V,V或许是行向量或许是列向量,也返回了行与列的索引值。如果X是一个逻辑表达式,那么V也是一个逻辑量组成的数组。通过分析表达式X得到一个逻辑数组,这个逻辑数组构成了输出的V。(~~~~(>_<)~~~~)
 For example, 举个例子
A= magic(4)    四阶魔方矩阵
A =
    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1

[r,c,v]= find(A>10);

r', c', v'
ans =
     1     2     4     4     1     3
ans =
     1     2     2     3     4     4
ans =
     1     1     1     1     1     1
Here the returned vector v is a logical array that contains the nonzero elements of N where N=(A>10)。
这里返回的向量V是一个逻辑数组,这个逻辑数组包含了非零元素N,N的位置是(A>10)=1的位置。


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

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

因为是为了帮助新手入门,所以我努力以人为本,说新手听得懂的语言,绝不一一对译。n(*≧▽≦*)n

如果我的翻译有错误,请指正。我会不断地进步并更新改进翻译的。请务必不吝赐教。在下感激不尽。

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

注:此文仅用作科研学习使用。如果我侵犯了您的权益,请告知。看到您的告知后,我将及时作出处理。

此文为原创,未经同意不得转载。所以转载到其他网站前,请询问在下。


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