1 function a=read_s(name,num1,num2)
2 % read sparse matrix from file created by call write_array subroutines with this name num1 num2
3 % the mode of reading may change; do not call the functions below directly
4 if ~exist('num1','var'),
7 if ~exist('num2','var'),
11 filename=file_name([name,'_sz'],num1,num2);
12 nn=read_array(filename);
13 filename=file_name([name,'_ia'],num1,num2);
14 ia=read_array(filename);
15 filename=file_name([name,'_ja'],num1,num2);
16 ja=read_array(filename);
17 filename=file_name([name,'_da'],num1,num2);
18 da=read_array(filename);
19 % create the sparse magtrix
20 a=sparse(ia,ja,da,nn(1),nn(2));