% Try PWDM for a circular stadium.


% Plot results of PWDM as a function of k. Find first ~17 eigenvalues visually.
k = 0.2:0.01:12;
tension=0; %initialize to prevent confusion
Nk = numel(k);
for ii = 1:Nk
   tension(ii) = pwdm(k(ii),0,12);
endfor
figure(1)
hold off
plot(k,log10(tension),'r')


% Fine structure in the spectrum around k=8.5
k = 8:0.001:9;
tension=0; %initialize to prevent confusion
Nk = numel(k);
for ii = 1:Nk
   tension(ii) = pwdm(k(ii),0,12);
endfor
figure(2)
hold off
plot(k,log10(tension),'r')


% Fine structure in the spectrum around k=11
k = 10.5:0.001:11.5;
tension=0; %initialize to prevent confusion
Nk = numel(k);
for ii = 1:Nk
   tension(ii) = pwdm(k(ii),0,12);
endfor
figure(3)
hold off
plot(k,log10(tension),'r')

k = 11.05:0.0001:11.10;
tension=0; %initialize to prevent confusion
Nk = numel(k);
for ii = 1:Nk
   tension(ii) = pwdm(k(ii),0,12);
endfor
figure(4)
hold off
plot(k,log10(tension),'r')