Can this for loop be made into array operations?

Hello,
I have the code:
% V is a 3 x n array
% T is a 3 x 3 rotation matrix
% U is a 3 x n array (rotated V)
for i = 1:n
U(:,i) = T * V(:,i);
end
which I have been attempting to rewrite as array operations. Does anybody have a solution for this?

 採用された回答

Oleg Komarov
Oleg Komarov 2011 年 7 月 13 日

2 投票

1 件のコメント

Joseph
Joseph 2011 年 7 月 13 日
I feel like quite the dunce. The math is apparent after reviewing the comments -- thanks for pointing out my idiocy.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by