function spectrum(a,x) % Plots eigenvalues of `a' % `x' must be character string accepted by plot % as the symbol/colour item, e.g., x='b*' for blue stars if nargin==1, x='r+'; end [n,m]=size(a); hold on h=eig(a); if x==1 for j=1:n plot(real(h(j)),imag(h(j)),'+') end else for j=1:n plot(real(h(j)),imag(h(j)),x) end end