Info

此问题已关闭。 请重新打开它进行编辑或回答。

how can i use my function just ones?

1 次查看(过去 30 天)
Alprcnkt
Alprcnkt 2016-4-11
关闭: MATLAB Answer Bot 2021-8-20
hello i have a function and a problem :)
function[result] = transform_vertices(v, m)
for i = 1 : size(v,2)
v(:,i) = m * v(:,i); %m * ith coloumn of v
end
result = v;
end
i should use this function(transform_vertices) just ONCE to rotate ,translate but how can i use just once? my code is
image1_vertices = quad;
image1_vertices = transform_vertices(transform_vertices(quad,mrotate(30)),mtranslate(-2,0));
PS: mtranslate and mrotate are also function which calculates rotation,translation
can anyone help ?
  1 个评论
Roger Stafford
Roger Stafford 2016-4-11
Your question is somewhat vague, but I'll hazard an answer. The operation of multiple rotation would presumably require a power, not a multiple, be taken of the single rotation matrix. You appear to be simply taking a scalar multiple in your code.
Please give a lot more details.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by