Home > RPSstuff > saveascii.m

saveascii

PURPOSE ^

SAVEASCII save an array in a formatted form

SYNOPSIS ^

function []=saveascii(file,data,format);

DESCRIPTION ^

 SAVEASCII save an array in a formatted form
   Usage:   saveascii(file,data,format);
           file = file name
           data = array to save
           format = format to be used for each line  (eg '%3d %3d %5.6f\n')

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function  []=saveascii(file,data,format);
0002 % SAVEASCII save an array in a formatted form
0003 %   Usage:   saveascii(file,data,format);
0004 %           file = file name
0005 %           data = array to save
0006 %           format = format to be used for each line  (eg '%3d %3d %5.6f\n')
0007 fid=fopen(file,'w');
0008 fprintf(fid,format,data');
0009 fclose(fid);
0010 disp([file ' created!']);

Generated on Wed 30-Nov-2005 14:45:02 by m2html © 2003