Documentation of printnewlink


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

a = printccm2ncbig;

Help text



Listing of function printnewlink

function a = printccm2ncbig;

cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/data_oi

a = []
%a = [' 1981-12']
%for i = 82:92;
%  for j = 1:12;
%    if j<10
%      a = [a ' 19' int2str(i) '-0' int2str(j)];
%    else
%      a = [a ' 19' int2str(i) '-' int2str(j)];
%    end
%  end
%end

%ln -s ../oi_82_98/test/1* .
s1 =                      ['             '];
%ln -s ../oi_82_98/endrun/1997-12 1997x12
s2 =                            ['       '];
%ln -s ../oi_82_98/1997-12 1997x12

a = ['ln -s ../oi_82_98/test/1* .' s1];

a = [a; 'ln -s ../oi_82_98/1981-12 1985x12' s2]
for i = 82:92;
  for j = 1:12
    if j<10
      a = [a; 'ln -s ../oi_82_98/19' int2str(i) '-0' int2str(j) ' 19' int2str(i+4) 'x0' int2str(j) s2];
    else
      a = [a; 'ln -s ../oi_82_98/19' int2str(i) '-' int2str(j) ' 19' int2str(i+4) 'x' int2str(j) s2];
    end
  end
end

for i = 1:6
  a = [a; 'ln -s ../oi_82_98/1993-0' int2str(i) ' 1997x0' int2str(i) s2];
end

for j = 7:12
  if j<10
    a = [a; 'ln -s ../oi_82_98/endrun/1993-0' int2str(j) ' 1997x0' int2str(j)];
  else
    a = [a; 'ln -s ../oi_82_98/endrun/1993-' int2str(j) ' 1997x' int2str(j)];
  end
end

for j = 1:6
  a = [a; 'ln -s ../oi_82_98/endrun/1994-0' int2str(j) ' 1998x0' int2str(j)];
end

[m,n] = size(a);
fname = ['newlink']
form = ['%' int2str(n) 's\n'];

for i = 1:m
  fid=fopen(fname,'a');
  fprintf(fid,form,a(i,:));
  fclose(fid);
end