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?

 Accepted Answer

1 Comment

I feel like quite the dunce. The math is apparent after reviewing the comments -- thanks for pointing out my idiocy.

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!