Solving Complex Matrix Operations
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Missael Hernandez
el 4 de Mzo. de 2020
Comentada: Missael Hernandez
el 4 de Mzo. de 2020
I have tried everything!
0 comentarios
Respuesta aceptada
Fabio Freschi
el 4 de Mzo. de 2020
You can do this in a for loop or using arrayfun
% your A vector
A = rand(1,1001); % dummy vector
% calculation of the matrix B
B = arrayfun(@(a)[cos(-a) sin(-a) 0; -sin(-a) cos(-a) 0; 0 0 1],A,'UniformOutput',false);
Than you can access each matrix using the {} indexing, e.g. the first matrix is
B{1}
etc
5 comentarios
Fabio Freschi
el 4 de Mzo. de 2020
Add
R = cellfun(@(Rx,Ry,Rz)Rx*Ry*Rz,Rx,Ry,Rz,'UniformOutput',false);
Más respuestas (0)
Ver también
Categorías
Más información sobre Parallel Computing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!