SPIKETRAIN_POWERSPECTRUM-Computepowerspectrumofaspiketrainusingpmtm[Pxx,Pxxc,F]=SPIKETRAIN_POWERSPECTRUM(SPIKETIMES,TIME_RESOLUTION)UsetheTomsonMulti-Tapermethod(seehelppmtm)tocalculatethepowerspectrumofalistofSPIKETIMES,sampledwithtimeresolutionTIME_RESOLUTION(e.g.,0.001for1/1000oftheunitsofSPIKETIMES).Onemaymodifythebehaviorofthefunctionbypassingname/valuepairs:Parameter(defaultvalue):Description------------------------------------------------------------------------NFFT([]):NumberofpointstoincludeintheFFT:(seeHELPPMTM)Example:dt=0.001;t=0:dt:100;%100secondslongrate=10*rectify(cos(2*pi*0.5*t)*dt);%spiketimes=t(find(rand(size(rate))<rate));[Pxx,Pxxc,F]=spiketrain_powerspectrum(spiketimes,0.01);figure;loglog(F,Pxx);holdon;loglog(F,Pxxc(:,1),'r-');loglog(F,Pxxc(:,2),'r-');title('Tomson Multitaper Power Spectral Density Estimate');xlabel('Frequency (Hz)');ylabel('Power/frequency (dB/Hz)');