Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

how can i use my function just ones?

1 view (last 30 days)
Alprcnkt
Alprcnkt on 11 Apr 2016
Closed: MATLAB Answer Bot on 20 Aug 2021
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 Comment
Roger Stafford
Roger Stafford on 11 Apr 2016
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.

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!