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 Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2011년 7월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by