%
clear f;
clear fc;
clear fcr;
clear a;
clear s;
clear srs;
clear srs_fa;
clear THF;
%
    [filename, pathname] = uigetfile('*.*');
        filename = fullfile(pathname, filename);
%      
        fid = fopen(filename,'r');
%        THF = fscanf(fid,'%g %g',[2 inf]);
%        THF=THF';
         THF=load(filename);
        sz=size(THF);
        f=double(THF(:,1));
        a=double(THF(:,2));
% 
         	fc(1)=8.94;
         	fc(2)=9.46;
           	fc(3)=10.; 
         	fc(4)=10.57;
        	fc(5)=11.18;
        	fc(6)=11.82;
          	fc(7)=12.5;
        	fc(8)=13.29;
        	fc(9)=14.14;
        	fc(10)=15.04;
          	fc(11)=16.0;
        	fc(12)=16.92;
        	fc(13)=17.89;
        	fc(14)=18.92;
           	fc(15)=20.;
         	fc(16)=21.2; 
         	fc(17)=22.4; 
         	fc(18)=23.7; 
           	fc(19)=25.;
         	fc(20)=26.5; 
         	fc(21)=28.1; 
         	fc(22)=29.8; 
         	fc(23)=31.5; 
         	fc(24)=33.4; 
         	fc(25)=35.5; 
         	fc(26)=37.7; 
           	fc(27)=40.; 
         	fc(28)=42.3; 
         	fc(29)=44.7;
         	fc(30)=47.3; 
           	fc(31)=50.;
           	fc(32)=53.;
         	fc(33)=56.1;
         	fc(34)=59.4;
           	fc(35)=63.;
         	fc(36)=66.9;
           	fc(37)=71.;
         	fc(38)=75.4;
           	fc(39)=80.;
         	fc(40)=84.6; 
         	fc(41)=89.4;
         	fc(42)=94.6;
          	fc(43)=100.;
        	fc(44)=105.7;
        	fc(45)=111.8;
        	fc(46)=118.2;
          	fc(47)=125.;
        	fc(48)=132.9;
        	fc(49)=141.4;
        	fc(50)=150.4;
          	fc(51)=160.;
        	fc(52)=169.2;
        	fc(53)=178.9;
        	fc(54)=189.2;
          	fc(55)=200.;
        	fc(56)=211.5;
        	fc(57)=223.6;
        	fc(58)=236.4;
          	fc(59)=250.;
        	fc(60)=264.9; 
        	fc(61)=280.6;
        	fc(62)=297.3;
          	fc(63)=315.;
        	fc(64)=334.4;
          	fc(65)=355.;
        	fc(66)=376.8;
          	fc(67)=400.;
        	fc(68)=422.9;
        	fc(69)=447.2;
        	fc(70)=472.9;
          	fc(71)=500.;
        	fc(72)=529.8;
        	fc(73)=561.3;
        	fc(74)=594.7;
          	fc(75)=630.;
        	fc(76)=668.8; 
        	fc(77)=709.9;
        	fc(78)=753.6;
          	fc(79)=800.;
        	fc(80)=845.9;
        	fc(81)=894.4;
        	fc(82)=945.7;
         	fc(83)=1000.;
       		fc(84)=1057.4;
         	fc(85)=1118.;
       		fc(86)=1182.2;
         	fc(87)=1250.;
       		fc(88)=1329.6;
       		fc(89)=1414.2;
       		fc(90)=1504.2;
         	fc(91)=1600.;
       		fc(92)=1691.8;
       		fc(93)=1788.9;
       		fc(94)=1891.5;
         	fc(95)=2000.;
         	fc(96)=2120.; 
         	fc(97)=2240.; 
         	fc(98)=2370.; 
           	fc(99)=2500.;
         	fc(100)=2650.; 
         	fc(101)=2810.; 
         	fc(102)=2980.; 
         	fc(103)=3150.; 
         	fc(104)=3340.; 
         	fc(105)=3550.; 
         	fc(106)=3770.; 
           	fc(107)=4000.;
            fc(108)=4229;
        	fc(109)=4472;
        	fc(110)=4729;
          	fc(111)=5000;
        	fc(112)=5298;
        	fc(113)=5613;
        	fc(114)=5947;
          	fc(115)=6300;
        	fc(116)=6688; 
        	fc(117)=7099;
        	fc(118)=7536;
          	fc(119)=8000;
            fc=fc/100;
%
ijk=0;
n=max(size(f));
ifc=max(size(fc));
%
for(i=1:n-1)
	   
          aa=log(a(i+1))-log(a(i));
          bb=log(f(i+1))-log(f(i));
          s(i)=aa/bb;
end    
%
ijk=1;
for(i=1:ifc)
	   
		  ff=fc(i);

		  if( ff >= f(1))
          
			for( j=2:n)
			
				if(ff < f(j))
				

					az=log10(a(j-1));
					az=az+s(j-1)*(log10(ff)-log10(f(j-1)));
					srs(ijk)=10^az;
                    fcr(ijk)=ff;
                    ijk=ijk+1;
					break;
                end
				if(ff == f(j))
				
					srs(ijk)=a(j);
                    fcr(ijk)=ff;
                    ijk=ijk+1;           

					break;
                end
            end
          end
%
end
srs_fa=[fcr' , srs']