how to create matrices efficiently
古いコメントを表示
Hi!
let's say I have 10 different angles. So I have a1, a2, a3, ... a10. I need to calculate 10 different 2x2 matrices depending those angles and save them. So my matrices will be [cos(a1), sin(a1); sin(a1), -cos(a1)] and so on. Question is how I can make those matrices without writing all 10 matrix by hand? I've tried make those by for loop and I think my problem is that I need multiple matrices instead vectors.
2 件のコメント
Azzi Abdelmalek
2013 年 9 月 21 日
This is not clear
Roger Stafford
2013 年 9 月 21 日
Just a note of caution. In case those 2x2 matrices were intended to be rotation matrices by the angles a1, a2, ..., the signs are wrong in the second column.
採用された回答
その他の回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!