MATLAB2014a中help与参考页中文翻译(用于学习) Tutorials-matrices and arrays- Matrix and Array Operations


镇场诗:慈心积善,为有缘人做大证明。以身作则,光照大千世界。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Tutorials-matrices and arrays- Matrix and Array Operations

Matrix and Array Operations 矩阵与数组的计算


MATLAB allows you to process all of the values in a matrix using a single arithmetic operator or function.
MATLAB允许你通过单一的运算符或者函数操作矩阵中所有变量
a + 10
ans =

    11    12    13
    14    15    16
    17    18    20
sin(a)
ans =

    0.8415    0.9093    0.1411
   -0.7568   -0.9589   -0.2794

    0.6570    0.9894   -0.5440


To transpose a matrix, use a single quote ('):

我们可以用一个引号去转置一个矩阵。


a'
ans =

     1     4     7
     2     5     8

     3     6    10


You can perform standard matrix multiplication, which computes the inner products between rows and columns, using the * operator.
你可以用*进行标准的矩阵乘法,这个乘法是矩阵行与列之间的计算。

For example, confirm that a matrix times its inverse returns the identity matrix:
例如,证明一个矩阵成上他的逆矩阵返回一个单位矩阵。




p = a*inv(a)
p =

    1.0000         0   -0.0000
         0    1.0000         0

         0         0    1.0000


Notice that p is not a matrix of integer values. MATLAB stores numbers as floating-point values, and arithmetic operations are sensitive to small differences between the actual value and its floating-point representation. You can display more decimal digits using the format command:

注意,这里的P矩阵不是一个整数类型。MATLAB以浮点方式存储元素了,注意:算术运算对于实际值与浮点数的存储之间的小差异是很敏感的。(浮点数很少比较相等)。你可以通过format命令显示更多的小数位数

format long
p = a*inv(a)
p =

   1.000000000000000                   0  -0.000000000000000
                   0   1.000000000000000                   0
                   0                   0   0.999999999999998

Reset the display to the shorter format using
重置显示方式为短格式。

format short


format affects only the display of numbers, not the way MATLAB computes or saves them.

Format只是影响数字的显示并不影响MATLAB关于他们的计算与存储。


To perform element-wise multiplication rather than matrix multiplication, use the .* operator:
为了进行数组元素的乘法,而不是数组的乘法,我们用运算符.*。
p = a.*a
p =

     1     4     9
    16    25    36

    49    64   100


The matrix operators for multiplication, division, and power each have a corresponding array operator that operates element-wise. For example, raise each element of a to the third power:
针对矩阵的乘法,除法,乘法运算符都有相对应的针对矩阵元素的运算符。举个例子,让a中的每一个元素都提升三次方。

a.^3
ans =

           1           8          27
          64         125         216
         343         512        1000




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

为了让每个新手使用MATLAB这一优秀的软件,所以翻译matlab, 借助了翻译软件和实践时候的经验,愿所有看了这篇翻译的人能得到一些启示。

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

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

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

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