How to formulate the following matrices?

1 visualización (últimos 30 días)
M
M el 18 de Mayo de 2022
Comentada: M el 19 de Mayo de 2022
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 comentarios
Image Analyst
Image Analyst el 18 de Mayo de 2022
Editada: Image Analyst el 18 de Mayo de 2022
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 el 18 de Mayo de 2022
Editada: Catalytic el 18 de Mayo de 2022
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.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 18 de Mayo de 2022
T=makehgtform('translate',[x(i),y(i),0],'zrotate',theta(i));
T=T([1,2,4],[1,2,4])

Más respuestas (1)

Catalytic
Catalytic el 18 de Mayo de 2022
Editada: Catalytic el 18 de Mayo de 2022
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 comentario
M
M el 19 de Mayo de 2022
@Catalytic, It could be also, but the above answer give you the transormation matrix directly without need to formulate it.

Iniciar sesión para comentar.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by