矩阵和数组有什么区别? [英] What is the difference between matrix and array?
问题描述
更笼统的术语是什么? 那为什么MATLAB被命名为矩阵实验室呢?
What is the more generalized term? Why is MATLAB named matrix laboratory, then?
推荐答案
矩阵是一种表示从尺寸为 n 的空间到尺寸为 m的空间的线性变换的实用方法. 以标量值的 nxm 数组的形式.
A matrix is a practical way to represent a linear transformation from a space of dimension n to a space of dimension m in the form of a nxm array of scalar values.
以可以在计算机上实现的非常系统的方式执行线性代数运算也是非常实用的.例如,如果矩阵 A 表示线性变换 f ,矩阵 B 表示线性变换 g ,则组成 f o g 写为A * B,其中*
表示矩阵乘法. Matlab还有很多与矩阵运算(即线性代数运算)相关的例程,例如det
,pinv
,svd
等...
It is also very practical to perform linear algebra operation in a very systematic way that can be implemented on a computer. For instance if matrix A represents the linear transformation f and matrix B the linear transformation g, then the composition f o g writes as A*B where *
denotes matrix multiplication. Matlab has also a lot of routines related to matrix operations (i.e. linear algebra operations) like det
, pinv
, svd
etc...
正如您今天在Matlab中仍然可以看到的那样,像*
,/
这样的运算符与矩阵运算紧密相关,因此与线性代数运算紧密相关,我认为这是matlab早期制定的最初目标,因此它的名字(肯定是投机性的,但猜测与现实相差不远).
As you can still see nowadays in Matlab, operators like *
, /
are strongly tied to matrix operations and thus strongly tied to linear algebra operations, which I think was the original goal of matlab in its early elaboration, hence its name (surely quite speculative but guess not so far from reality).
要对n维数据集执行逐元素运算,必须编写.*
或./
.表示您正在执行阵列操作.
To perform element-wise operations on n-dimensional data sets, you have to write .*
, or ./
. denoting you are now performing array operations.
我不会说数组运算包含矩阵运算,它们是不同的.后面的与线性代数有关,而其他的仅与对大数据集进行运算的实用方式有关.这些数据不限于数字,它们只是n维数据集,无论是什么(字符串,数字,单元格等).
I would not say array operations encompass matrix operations, they are different. The later ones relate to linear algebra, while the other ones just relate to a practical way to operate on large sets of data. These data are not limited to be numbers, they are just n-dimensional data sets of whatever (string, numbers, cells, etc...).
Matlab还具有非常综合的语法,可以对子块(即线性/逻辑下标)执行数组运算,这使得在应用后续代码之前仅用一行代码即可很容易地重组数据集. 矩阵或数组操作.
Matlab also has a very synthetic syntax to perform array operations on sub-blocks (i.e. linear/logical subscripts) that makes it very easy to reorganize data sets in just one line of code before applying subsequent matrix or array operations.
这篇关于矩阵和数组有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!