1 function a=read_array_unf(file)
2 % read array from fortran unformatted file
4 if fid < 0, error('cannot open file'),end
5 m=read_rec(fid,1,'int');
6 if m~=1, error('bad file format type'),end
7 n=read_rec(fid,1,'int');
8 if n>3, error('only 3 dimensions supported'),end
11 nn(i)=read_rec(fid,1,'int');
13 fprintf(1,'reading dense matrix size %i %i %i from file %s\n',m,n,file)
17 a(:,i2,i3)=read_rec(fid,nn(1),'double');