clear all
clc 

outfile='obs_float/oneandfive_final.dat';
load obs_float/oneandfive.dat;
[m,n]=size(oneandfive)


    count=1;
    for s=1:m/2
        oneandfive(s,2)=count;
     
        oneandfive(s+m/2,2)=count;
      
        count=count+3;
    
    
    end

fid=fopen(outfile,'w');
fprintf(fid,'%d %d %d %f\n',oneandfive(:,1:4)');



outfile='obs_float/final_oneandfive.dat';
load obs_float/oneandfive_final.dat;
[d,f]=size(oneandfive_final)
floater1=zeros(d,f);
count1=1;


for i=1:d/2
        floater(count1,:)=oneandfive_final(i,:);
        floater(count1+1,:)=oneandfive_final(i+d/2,:);

        count1=count1+2;
   
end


fid=fopen(outfile,'w');
fprintf(fid,'%d %d %d %f\n',floater');
fclose(fid);

outfile='obs_float/obs_oneandfive.dat';
load obs_float/final_oneandfive.dat;
[d,f]=size(final_oneandfive);
counter=1;

for i=d/2+1:2:d
    
final_oneandfive(i,2)=counter;
final_oneandfive(i+1,2)=counter;
counter=counter+3;
end
I=find(final_oneandfive(:,3)==1);
final_oneandfive(I,3)=1;
I=find(final_oneandfive(:,3)==3);
final_oneandfive(I,3)=2;

fid=fopen(outfile,'w');
fprintf(fid,'%d %d %d %f\n',final_oneandfive');
fclose(fid);
