본문 바로가기
Matlab

Matlab으로 원 그리기

by intermetallic 2023. 2. 24.

 

r = 5; % radius of the circle in cm
theta = linspace(0, 2*pi, 1000); % create 1000 points evenly spaced around the circle
x = r*cos(theta); % x-coordinates of the circle points
y = r*sin(theta); % y-coordinates of the circle points

plot(x, y); % plot the circle
axis equal; % set the aspect ratio to 1:1
title('Circle with Radius 5 cm'); % set the title
xlabel('x (cm)'); % set the x-axis label
ylabel('y (cm)'); % set the y-axis label

'Matlab' 카테고리의 다른 글

Matlab으로 fcc 3d frame 만들기  (0) 2023.02.25

댓글