source: altifloat/matlab_toolbox/create3.m @ 199

Last change on this file since 199 was 129, checked in by jbrlod, 10 years ago

last version of Varanth

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1clear all
2clc
3
4outfile='obs_float/oneandfive_final.dat';
5load obs_float/oneandfive.dat;
6[m,n]=size(oneandfive)
7
8
9    count=1;
10    for s=1:m/6
11        oneandfive(s,2)=count;
12        oneandfive(s+m/6,2)=count;
13        oneandfive(s+2*m/6,2)=count;
14        oneandfive(s+3*m/6,2)=count;
15        oneandfive(s+4*m/6,2)=count;
16        oneandfive(s+5*m/6,2)=count;
17
18     
19        count=count+3;
20   
21   
22    end
23
24fid=fopen(outfile,'w');
25fprintf(fid,'%d %d %d %f\n',oneandfive(:,1:4)');
26
27
28
29outfile='obs_float/final_oneandfive.dat';
30load obs_float/oneandfive_final.dat;
31[d,f]=size(oneandfive_final)
32floater1=zeros(d,f);
33count1=1;
34
35
36for i=1:d/2
37        floater(count1,:)=oneandfive_final(i,:);
38        floater(count1+1,:)=oneandfive_final(i+d/2,:);
39   
40
41        count1=count1+2;
42   
43end
44
45
46fid=fopen(outfile,'w');
47fprintf(fid,'%d %d %d %f\n',floater');
48fclose(fid);
49
50outfile='obs_float/obs_oneandfive.dat';
51load obs_float/final_oneandfive.dat;
52[d,f]=size(final_oneandfive);
53counter=1;
54I=find(final_oneandfive(:,3)==1);
55final_oneandfive(I,3)=4;
56I=find(final_oneandfive(:,3)==2);
57final_oneandfive(I,3)=1;
58I=find(final_oneandfive(:,3)==3);
59final_oneandfive(I,3)=2;
60fid=fopen(outfile,'w');
61fprintf(fid,'%d %d %d %f\n',final_oneandfive');
62fclose(fid);
Note: See TracBrowser for help on using the repository browser.