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')
22 if ~isempty(read_array_msg)
24 fprintf('reading matrix size %g %g %g from file %s\n',n1,n2,n3,filename)
27 a=reshape(X(6:m),n1,n2,n3);