How can I rotate, scale and transform x y z coordination.
3 views (last 30 days)
Show older comments
I want to do coding for following equations. How i do it using mat lab. Please help me.
0 Comments
Accepted Answer
KSSV
on 4 Oct 2016
clc; clear all ;
% square coordinates
Sx = [0 1 1 0 0] ;
Sy = [0 0 1 1 0] ;
S = [Sx' Sy'] ;
% Rotation
th = linspace(0,2*pi) ;
for i = 1:length(th)
R = [cos(th(i)) sin(th(i)) ; -sin(th(i)) cos(th(i))] ;
Sr = S*R ;
plot(S(:,1),S(:,2),'b')
hold on
plot(Sr(:,1),Sr(:,2),'r')
hold off
drawnow
pause(0.1)
end
More Answers (0)
See Also
Categories
Find more on Hamamatsu Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!