Changeset 1330


Ignore:
Timestamp:
07/16/09 10:01:08 (16 years ago)
Author:
Mathieu Morlighem
Message:

better way to write exp files

Location:
issm/trunk/src/m/utils/Exp/readwrite
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/Exp/readwrite/expwrite.m

    r1135 r1330  
    3232   fprintf(fid,'%i %f\n',[length(a(n).x) a(n).density]);
    3333   fprintf(fid,'%s\n','# X pos Y pos');
    34 
    35    for i=1:length(a(n).x),
    36          fprintf(fid,'%f %f\n',[a(n).x(i) a(n).y(i)]);
    37    end 
    38    fprintf(fid,'\n','');
     34        fprintf(fid,'%10.10f %10.10f\n',[a(n).x a(n).y]');
     35        fprintf(fid,'\n','');
    3936   
    4037end
  • issm/trunk/src/m/utils/Exp/readwrite/expwriteasvertices.m

    r1 r1330  
    1616
    1717fid=fopen(filename,'w');
    18 for n=1:length(a.x),
    19    
    20         fprintf(fid,'%s\n','## Name:');
    21         fprintf(fid,'%s\n','## Icon:0');
    22         fprintf(fid,'%s\n','# Points Count  Value');
    23         fprintf(fid,'1 1.\n');
    24         fprintf(fid,'%s\n','# X pos Y pos');
    25         fprintf(fid,'%f %f\n\n',[a.x(n) a.y(n)]);
    26 
    27 end
     18fprintf(fid,'%s\n','## Name:');
     19fprintf(fid,'%s\n','## Icon:0');
     20fprintf(fid,'%s\n','# Points Count  Value');
     21fprintf(fid,'1 1.\n');
     22fprintf(fid,'%s\n','# X pos Y pos');
     23fprintf(fid,'%10.10f %10.10f\n',[a.x a.y]');
     24fprintf(fid,'\n','');
    2825fclose(fid);
Note: See TracChangeset for help on using the changeset viewer.