format compact format short echo on clc % Generate a complex exponential spiral % Start with a point on the unit circle a = pi/4; z = cos(a) + i*sin(a); pause % Move it in a bit z = .99*z; pause % Make the exponential sequence n = 1:100; x = z.^n; % Plot it figure(1) plot3(real(x), imag(x), n) grid on axis square pause % Make a random impulse response % & convolve it with x h = rand(5,1); y = conv(h,x); % Avoid edge effects y1 = y(5:100); n1 = n(1:96); x1 = x(1:96); pause % Plot the result figure(2) plot3(real(y1), imag(y1), n1) grid on axis square pause % What's the "eigenvalue" (i.e. H(z))? y1./x1