1 function write_array_nd(a,name)
2 % write_array_nd(a,name)
3 % Purpose: write nd matrix
6 % a nd matrix, the array to be written
7 % name string, the name of the file
10 error('matrix must be numeric array')
12 filename=[name,'.txt'];
15 fprintf('writing matrix size %g %g %g %g %g %g %g',s)
16 fprintf('to file %s\n',filename)
17 h=fopen(filename,'w');
18 fprintf(h,'%i\n',456,n,s);
19 fprintf(h,'%.12g\n',a);