I want to change xlim,ylim of axes , and draw a circle at the point I chose when I click on a place in the axes in GUI
조회 수: 1 (최근 30일)
이전 댓글 표시
채택된 답변
KSSV
2021년 10월 25일
th = linspace(0,2*pi) ;
R = 1. ; % Radius of circle
x = R*cos(th) ; y = R*sin(th) ;
figure
axis([-5 5 -5 5]) ; % cahange axes here to your desired
[Cx,Cy] = getpts() ; % click where you want to draw circle; double click to exit
hold on
% plot the circles
for i = 1:length(Cx)
plot(Cx(i)+x,Cy(i)+y)
end
axis equal
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!