How can i draw a previously specified dimensions lattice ?

조회 수: 1 (최근 30일)
Abdelwahab Fawzy
Abdelwahab Fawzy 2016년 7월 12일
답변: Robert 2016년 7월 12일
if i have a center point (xo, yo) and i want to draw a lattice of crossed circles similar to the following figure where the radius of the circle is (r)

답변 (1개)

Robert
Robert 2016년 7월 12일
Using x as your list of x coordinates and y as your list of y coordinates of the circle centers:
R = 1; % or whatever you like...
t = linspace(0,2*pi,100);
cx = R*cos(t);
cy = R*sin(t);
figure
hold all
for ii = 1:length(x)
plot(cx+x(ii),cy+y(ii))
end
hold off
axis equal

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by