필터 지우기
필터 지우기

dot product function in Matlab

조회 수: 4 (최근 30일)
AD
AD 2016년 12월 27일
이동: John D'Errico 2023년 11월 25일
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일
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개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by