.* and * give me different answer

1 vue (au cours des 30 derniers jours)
yoohooo's
yoohooo's le 28 Juil 2019
Commenté : Stephen23 le 28 Juil 2019
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.

Réponse acceptée

amin ya
amin ya le 28 Juil 2019
* % matrix multiplication
.* % element wise multiplication

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by