n1=1;
n2=1.444;
data=dlmread('mysignal.txt');
lam=data(:,1);
I=data(:,4);
wave1=2*pi./lam;
I1=fliplr(I);
wave2=linspace(wave1(1),wave1(end),length(lam));
I2=interp1(wave1,I1,wave2);
inc=mean(diff(lam));
figure(2)
L=length(I2);
Fs = 1/inc;
Fn = Fs/2;
FTT = (fft(I2)/length(I2));
FvT = linspace(0, 1, fix(numel(FTT)/2)+1)*Fn;
FvT=FvT;
IvT = 1:numel(FvT);
xs=0;xe=3;
plot(FvT,abs(FTT(IvT))*2,'b','linewidth',1);
[pk,loc]=findpeaks(abs(FTT(IvT))*2,FvT,'SortStr','descend');
x1=loc(1);x2=loc(2);x3=loc(3);x4=loc(4);x5=loc(5);
xxx=[x1 x2 x3 x4 x5]
dn1=0.005;f1=loc(1)-dn1;f2=loc(1)+dn1;
order1=1;
[b,a] = butter(order1,[f1 f2]/Fn,'bandpass');