clear all
clc 

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


    count=1;
    for s=1:m/6
        oneandfive(s,2)=count;
        oneandfive(s+m/6,2)=count;
        oneandfive(s+2*m/6,2)=count;
        oneandfive(s+3*m/6,2)=count;
        oneandfive(s+4*m/6,2)=count;
        oneandfive(s+5*m/6,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;
I=find(final_oneandfive(:,3)==1);
final_oneandfive(I,3)=4;
I=find(final_oneandfive(:,3)==2);
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);
