Dot Product of Rows in array
Show older comments
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
Answers (1)
KSSV
on 21 Jun 2022
iwant = sum(A.*B,2) ;
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!