matlab 中在运算符号前加一点是什么意思?

例如,矩阵A、B,A*B和A.*B有什么区别?... 例如,矩阵A、B,A*B和A.*B有什么区别? 展开
 我来答
科研知识
推荐于2017-09-26 · TA获得超过220个赞
知道小有建树答主
回答量:232
采纳率:100%
帮助的人:94.8万
展开全部
*表示矩阵相乘(矩阵的乘法)
.*表示各个元素分别相乘
a=[0 1;2 3];
>> b=[3 2;0 1];
>> c=a*b

c =

0 1
6 7
%
c=[ 0*3+1*0 0*2+1*1
2*3+3*0 2*2+3*1]
%
>> c=a.*b

c =

0 2
0 3
%
c=[ 0*3 1*2
2*0 3*1]
%

>> help *
* Matrix multiply.
X*Y is the matrix product of X and Y. Any scalar (a 1-by-1 matrix)
may multiply anything. Otherwise, the number of columns of X must
equal the number of rows of Y.

C = mtimes(A,B) is called for the syntax 'A * B' when A or B is an
object.

See also times.

Overloaded methods:
gf/mtimes
codistributed/mtimes
LagOp/mtimes
fints/mtimes
idmodel/mtimes
localpoly/mtimes
icsignal/mtimes
InputOutputModel/mtimes
cvdata/mtimes
timeseries/mtimes
laurpoly/mtimes
laurmat/mtimes

Reference page in Help browser
doc mtimes

>> help .*
.* Array multiply.
X.*Y denotes element-by-element multiplication. X and Y
must have the same dimensions unless one is a scalar.
A scalar can be multiplied into anything.

C = times(A,B) is called for the syntax 'A .* B' when A or B is an
object.

See also mtimes.

Overloaded methods:
gf/times
codistributed/times
fints/times
DynamicSystem/times
cvdata/times
categorical/times
timeseries/times

Reference page in Help browser
doc times
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式