.* and * give me different answer

2 次查看(过去 30 天)
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.

采纳的回答

amin ya
amin ya 2019-7-28
* % matrix multiplication
.* % element wise multiplication

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by