Rotational Matrix concept and application in MATLAB from Scratch

MATLAB Code:



Code:

t=0:0.01:2*pi;
x=sin(t);
plot(t,x,'g');
hold on;
a=-pi/2;
z=[cos(a) -sin(a);sin(a) cos(a)];
m=[t;x];
k=z*m;


r=k(1,:);
y=k(2,:);
plot(r,y,'b');



No comments