Index in position 1 is invalid. Array indices must be positive integers or logical values. Error in Q (line 13) D(I,J) = D(I,J)+A(I,K).*B(K,J)
Show older comments
HI , how can i fix line 13?

Answers (1)
David Fletcher
on 17 Apr 2021
1 vote
In Matlab indices start at 1 (your loops start at 0)
Categories
Find more on Matrices and Arrays 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!