Matlab中*和.*有什么区别? [英] What is the difference between * and .* in matlab?
本文介绍了Matlab中*和.*有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Matlab中*
和.*
有什么区别?
What is the difference between *
and .*
in Matlab?
推荐答案
*
是向量或矩阵乘法
.*
是元素明智的乘法
*
is a vector or matrix multiplication
.*
is a element wise multiplication
a = [ 1; 2]; % column vector
b = [ 3 4]; % row vector
a*b
ans =
3 4
6 8
同时
a.*b.' % .' means tranpose
ans =
3
8
这篇关于Matlab中*和.*有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文