Plotting noncontinuous arc segments
이전 댓글 표시
Hey all,
I am trying to plot a non-continuous arc of a circle, given the center, radius and angle ranges of the arc(s). For instance, say I want to plot the following angle range:
0,...,0.75*pi,1.25*pi,...,2*pi
There's a gap between 0.75*pi and 1.25*pi. I don't want MATLAB to plot anything "between" these two angles, but it plots a straight vertical line.
This the basic structure of my code:
t=[];
for theta=0:0.01:2*pi
if % irrelevant condition that decides if the arc covers this angle
t=[t theta];
end
end
plot(a1*cos(t),a1*sin(t),'b--')
And here is the figure:

I want to 'skip' the vertical line. Is this possible?
Any kind of assistance would be greatly appreciated!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
