1 function a=read_array_tiles(root,tiles,num1,num2);
2 % a=read_array_tiles(root,ntiles,num1,num2)
3 % read array produced by matching calls write_array_m
4 % in module_fr_sfire_util.F
5 % from files root[_num1[_num2]].nnnn.txt, nnnn=1:ntiles
6 % if tiles=[] same as read_array_sp(root,num1,num2)
10 if ~exist('num1','var'),
13 if ~exist('num2','var'),
16 ff=file_name(root,num1,num2);
18 a=read_array_sp([ff,'.txt']);
22 f=sprintf('%s.%4.4i.txt',ff,tiles(i));
23 tile{i}=full(read_array_sp(f));
24 mm(i)=size(tile{i},1);
25 nn(i)=size(tile{i},2);
32 b(1:mm(i),1:nn(i))=tile{i};
33 overlap= a(:) ~=0 & b(:)~=0;
35 warning('tiles overlap')
36 if(any(a(overlap) ~= b(overlap))),
37 warning('inconsistent values on overlap')