clear all
clf
echo on

subplot(2,3,1)
t = 0:0.1:10;
z = impulse(1, [1 1 1], t);
stairs(t(1:5:end),z(1:5:end))
hold on
plot(t,z,'r')
plot([0 t(end)], [0 0], 'k:')
title('Impulse Response - (STAIRS)')

subplot(2,3,2)
theta = 2*pi*(0:74)/75;
x = cos(theta);
y = sin(theta);
z = abs(fft(ones(10,1), 75))';
stem3(x, y, z)
title('Polar FFT - (STEM3)')

subplot(2,3,3)
[X,Y,Z] = peaks(-2:0.25:2);
[U,V] = gradient(Z, 0.25);
contour(X,Y,Z,10);
hold on
quiver(X,Y,U,V);
title('Surface Gradient - (CONTOUR & QUIVER)')

theta = 0:0.1:4*pi;
[x,y] = pol2cart(theta(1:5:end), theta(1:5:end));

subplot(2,3,4)
polar(theta,theta)
axis([-13 13 -12.5 14.5])
title('Spiral Plot - (POLAR)')

subplot(2,3,5)
compass(x,y)
axis([-13 13 -12.5 14.5])
title('Direction Vectors - (COMPASS)')

subplot(2,3,6)
feather(x(1:19),y(1:19))
axis([1 21 -5 10])
title('Direction Vectors - (FEATHER)')
set(gcf,'Position', [64 111 887 564])

echo off
shg