recipes : Plotting : Line and Scatter Plots : How do I plot a spiral?

Problem

How do I plot a spiral in MATLAB?

Solution
turns=5; %The number of turns the spiral will have

x=[-1*pi*turns : 0.02 : pi*turns];
r=[0:1/(length(x)-1):1];

X=sin(x).*r;  Y=cos(x).*r;
plot(X,Y,'-k','LineWidth',2)
axis off square