1 function a=read_array(name)
2 % read matrix a from a given file name.txt
3 filename=[name,'.txt'];
4 if ~exist(filename,'file'),
11 error(['cannot load matrix in file ',filename,' bad format'])
15 error('file must contain column vector')
21 fprintf('reading matrix size %g %g %g from file %s\n',n1,n2,n3,filename)
22 a=reshape(X(6:m),n1,n2,n3);