Solving Complex Matrix Operations
4 ビュー (過去 30 日間)
古いコメントを表示
Missael Hernandez
2020 年 3 月 4 日
コメント済み: Missael Hernandez
2020 年 3 月 4 日
I have tried everything!
0 件のコメント
採用された回答
Fabio Freschi
2020 年 3 月 4 日
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 件のコメント
Fabio Freschi
2020 年 3 月 4 日
Add
R = cellfun(@(Rx,Ry,Rz)Rx*Ry*Rz,Rx,Ry,Rz,'UniformOutput',false);
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!