Array of Matrices multiplication
Mostrar comentarios más antiguos
Solving an exercise for orbital mechanics I found a problem while multiplying a 3x3 matrix by a 3x1 Matrix, actually these matrices have 1442 values so first one is 3x4326 and second one is 3x1442. First array is a vector of 3x3 matrices but I do not know how to separate each matrix and then multiply them by my 3x1 array of matrices. I have tried with a for loop, or by selecting the arrays or columns and then compute the operation but that did not work. The full code is very large and has other .m files involved so I am attaching the specific lines with the problem:
%% Position
R3_Thot = [cos(Tho_t), sin(Tho_t), z_0; -sin(Tho_t), cos(Tho_t), z_0; z_0, z_0, z_1];
%%% 3x3 array of matrices with 3x4326 length
%%% R_p1 is an array of 3x1 matrices with a 3x1442 length
Rpos_Efix1 = R3_Thot*R_p1; %%% I want to perform this operation but I got errors like size mismatching
I tried also with .* operator but does not work, and I am not sure how to solve or compute them using a for loop.
1 comentario
Hugo Hernández Hernández
el 9 de Dic. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Scenario Generation and Visualization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!