- /
-
Gistlib Generated Entry: plot a smily in matlab
on 19 Oct 2022
- 2
- 97
- 0
- 0
- 200
% https://gistlib.com/matlab/plot-a-smily-in-matlab
% create a figure
figure;
% plot the face
t = linspace(0, 2*pi, 100);
plot(sin(t), cos(t), 'k');
% plot the eyes
hold on;
plot(0.2*sin(t), 0.2*cos(t), 'k');
plot(-0.2*sin(t), 0.2*cos(t), 'k');
% plot the mouth
plot(0.5*sin(t), -0.5*cos(t), 'k');
% set the axis
axis([-1 1 -1 1]);
axis equal;
axis off;