Sum of matrix times scalars
Ältere Kommentare anzeigen
Hi,
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 Kommentare
KALYAN ACHARJYA
am 21 Okt. 2019
Are these matrices in cell array or different individuals variables names?
Stephen23
am 21 Okt. 2019
Use indexing, then your task is trivial.
Mohammed Kagalwala
am 21 Okt. 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!