Dot Product of Rows in array

조회 수: 5 (최근 30일)
Ahmed Abdulla
Ahmed Abdulla 2022년 6월 21일
답변: KSSV 2022년 6월 21일
I have two arrays, A of size 1000x2 and B of size 1000x2. I would like to get dot product of the each set of rows so that the result is an array of size 1000x1 with the results. Without using a for loop

답변 (1개)

KSSV
KSSV 2022년 6월 21일
iwant = sum(A.*B,2) ;

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by