How to formulate the following matrices?

1 次查看(过去 30 天)
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