MATLAB Answers

.* and * give me different answer

2 ビュー (過去 30 日間)
yoohooo's
yoohooo's 2019 年 7 月 28 日
コメント済み: Stephen Cobeldick 2019 年 7 月 28 日
F = [1.5 0.2; 0.2 1.3];
I = eye(2);
E = 1/2*(F'*F-I);
E =
0.6450 0.2800
0.2800 0.3650
E = 1/2*(F'.*F-I);
E =
0.6250 0.0200
0.0200 0.3450
Why did * operates differ from .*? Can someone show the math behind the .* operator? When I was doing it by hand I got the answer same as * operator.

  1 件のコメント

Sign in to comment.

採用された回答

amin ya
amin ya 2019 年 7 月 28 日
* % matrix multiplication
.* % element wise multiplication

  0 件のコメント

Sign in to comment.

その他の回答 (0 件)

タグ


Translated by