I was asked to find different ways to plot a circle in MATLAB,
It seems boring. However I could come up with some ideas (some might be inefficient!),
Method 1
ezpolar(@(x)1);
Method 2
t = linspace(0,2*pi,100);
plot(sin(t),cos(t));
Method 3
[X,Y,~] = cylinder(1,100);
plot(X(1,:),Y(1,:));
Method 4
ezplot('x^2 + y^2 - 1');
Method 5
theta = linspace(0,2*pi,100);
ro = ones(1,100);
[X,Y] = pol2cart(theta,ro);
plot(X,Y);
and it got interesting.
I'm curious if you have other ideas.
Thanks.
Edit
Method 11
azimuth = linspace(-pi,pi,100);
r = ones(1,100);
elevation = zeros(1,100);
[X,Y,Z] = sph2cart(azimuth,elevation,r);
patch(X,Y,Z