help with multiplying matrix
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jama Ali
am 12 Okt. 2020
Bearbeitet: Ameer Hamza
am 12 Okt. 2020
Hi, I have 100 6*6 matrices and one 1*100 matrices. i want to multiply the number on the 1x100 matrices with the corresponding 6x6 matrices as shown in the picture below. how can i do that?
thanks for the help

0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 12 Okt. 2020
Bearbeitet: Ameer Hamza
am 12 Okt. 2020
If you use a recent version of MATLAB which support implicit array expansion
M; % 6x6x100 matrix
v; % 1x100 vector
M_new = M.*reshape(v, 1, 1, []);
on older versions
M_new = bsxfun(@times, M, reshape(A,1,1,[]))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Computational Geometry finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!