Sum of matrix times scalars
조회 수: 2(최근 30일)
표시 이전 댓글
편집: Mohammed Kagalwala 2019년 10월 21일
I have a series of 3x3 matrices T1, T2, T3 ... TN. In addition, I have a series of scalars a1, a2, ... aN. I wish to perform the following sum WITHOUT the use of a for-loop. T1*a1 + T2*a2 + .... TN*aN. I have solved this using a for loop currently, but wish to take advantage of Matlabs superior data structures i.e. 3D arrays, cells, etc.
Thank you for your help !
댓글 수: 3
Matt J 2019년 10월 21일
편집: Matt J 2019년 10월 21일
Hold your 3x3 matrices in a 3x3xN array caled T and your scalars in an Nx1 vector called a and do,
댓글 수: 2
Find more on Mathematics 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!