Hello, I'm trying to plot several lines in a circle and need to trim the part of lines which are out of this circle. So how can I do that? Thank you in advance
% plotting random lines
X1 = rand (8,8);Y1 = rand (8,8);figureplot (X1,Y1)hold on % plotting the circle
R = 0.5; angle = linspace(0,2*pi,180); x= R*cos(angle); y= R*sin(angle); plot(x,y,'r') axis equal
Best Answer