put_file

PURPOSE ^

PUT_FILE - ???

SYNOPSIS ^

function put_file(a,file_name);

DESCRIPTION ^

PUT_FILE - ???

   Usage:
      put_file(a,file_name)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function put_file(a,file_name);
0002 %PUT_FILE - ???
0003 %
0004 %   Usage:
0005 %      put_file(a,file_name)
0006 
0007 fid=fopen(file_name,'wt');
0008 for n=1:length(a),
0009    
0010    newline(fid);
0011    fprintf(fid,'%s %s\n','## Name:');
0012    newline(fid);
0013    fprintf(fid,'%s %s\n','## Icon:0');
0014    newline(fid);
0015    fprintf(fid,'%s %s %s %s\n','# Points Count Value');
0016    newline(fid);
0017    fprintf(fid,'%i %f\n',[length(a(n).x)+1 1]);
0018    fprintf(fid,'%s %s %s %s %s\n','# X pos Y pos');
0019    newline(fid);
0020 
0021     for i=1:length(a(n).x),
0022          fprintf(fid,'%f %f\n',[a(n).x(i) a(n).y(i)]);
0023    end  
0024    if n==length(a),
0025       fprintf(fid,'%f %f',[a(n).x(1) a(n).y(1)]);
0026    else
0027       fprintf(fid,'%f %f\n',[a(n).x(1) a(n).y(1)]);
0028    end
0029 
0030 end
0031 fclose(fid);

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003