dot product function in Matlab

Hello, I just tried to do in Matlab :
I=eye(3)
dot(I,I)
--> the result is [1 1 1]
To my understanding it clearly should be [0 0 0] !!! Why does it produce 1 1 1 ?
Best regards,
(P.S. It works correctly with other e.g. random matrices)

 採用された回答

Walter Roberson
Walter Roberson 2016 年 12 月 27 日

0 投票

dot(A,B), for N-D arrays A and B, returns the scalar product
along the first non-singleton dimension of A and B. A and B must
have the same size.
>> dot(I(:,1),I(:,1))
ans =
1

1 件のコメント

AD
AD 2016 年 12 月 27 日
移動済み: John D'Errico 2023 年 11 月 25 日
or sorry .. I made a mistake ... what I did was useless, I was projecting it on itself - so to speak.
projecting each vector on himself gives his own norm

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLinear Algebra についてさらに検索

タグ

質問済み:

AD
2016 年 12 月 27 日

移動済み:

2023 年 11 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by