How to formulate the following matrices?

조회 수: 1 (최근 30일)
M
M 2022년 5월 18일
댓글: M 2022년 5월 19일
How to formulate the following matrices? (which is called the transformation matrices)
Theta is the degree angle which stored in file 'Angles' ,,, x,y is the origins which stored in file origin
T = [cos(theta(i)) -sin(theta(i)) x(i)
sin(theta(i)) cos(theta(i)) y(i)
0 0 1]
  댓글 수: 2
Image Analyst
Image Analyst 2022년 5월 18일
편집: Image Analyst 2022년 5월 18일
You formulated a matrix T. What's the problem? Explain in more detail after reading this:
For example you might include a diagram to show what needs to be rotated.
FYI
Catalytic
Catalytic 2022년 5월 18일
편집: Catalytic 2022년 5월 18일
I need help in iterating my thetas and origins into this matrix and storing the results.
You shouldn't. It's a trivial Matlab for-loop exercise.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2022년 5월 18일
T=makehgtform('translate',[x(i),y(i),0],'zrotate',theta(i));
T=T([1,2,4],[1,2,4])

추가 답변 (1개)

Catalytic
Catalytic 2022년 5월 18일
편집: Catalytic 2022년 5월 18일
Why not just -
T=zeros(3,3,n);
for i=1:n
T(:,:,i) = [cos(theta(i)) -sin(theta(i)) x(i)
sin(theta(i)) cos(theta(i)) y(i)
0 0 1];
end
  댓글 수: 1
M
M 2022년 5월 19일
@Catalytic, It could be also, but the above answer give you the transormation matrix directly without need to formulate it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by