1 function write_array(a,name)
3 % matrix a to a given file name.txt
5 error('array must have at most 3 dimensions')
7 filename=[name,'.txt'];
9 X(1)=456; % magic number
15 fprintf('writing matrix size %g %g %g to file %s\n',...
17 h=fopen(filename,'w');
18 fprintf(h,'%.17g\n',X);