--
You received this message because you are subscribed to the Google Groups "freemat" group.
To view this discussion on the web visit https://groups.google.com/d/msg/freemat/-/Nauqrbd3q0MJ.
To post to this group, send email to fre...@googlegroups.com.
To unsubscribe from this group, send email to freemat+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freemat?hl=en.
len = 1;
line1 = [0 len; 0 0];
%Define angle and rotation matrix to calculate x and y together
angle = pi/2/4;
rotMatrix = [cos(angle) -sin(angle); sin(angle) cos(angle)];
%Rotate it
line2 = rotMatrix*line1;
%Rotate it
line3 = rotMatrix*line2;
%Plot the lines, splitting each row into x and y
hold on;
plot(line1(1,:),line1(2,:));
plot(line2(1,:),line2(2,:));
plot(line3(1,:),line3(2,:));
%Define and plot the arc
a = 0:angle/100:angle*2;
plot(len*cos(a), len*sin(a));
%Set the limits on the X and Y for looks
xlim([-0.5*len,1.5*len]);