function [w,A,V] = dpssw(M,Wc); % DPSSW - Digital Prolate Spheroidal Sequence window % (Slepian window) of length M, having % cut-off frequency Wc in (0,pi). k = (1:M-1); s = sin(Wc*k)./ k; c0 = [Wc,s]; A = toeplitz(c0); % c0=1st col of symm. Toeplitz mtx [V,evals] = eig(A); % Only need principal eigenvector [emax,imax] = max(abs(diag(evals))); w = V(:,imax); w = w / max(w);
Kaiser and DPSS Window Transforms Compared