


brede_read_txtmatrix - Read a 'Mat' structure from text files.
M = brede_read_txtmatrix
Property: Filename [ {mat} ] Prefix of the filename for the
three text files
Info [ {0} | integer ] Amount of debug
information
LoadMethod [ {load} | SparseLines | SparseIndices |
SparseIndices0 ]
Output: M 'Mat' structure
Reads a 'mat' structure from text files. The default file
names is
mat_matrix.txt
mat_columns.txt
mat_rows.txt
For 'SparseIndices' or 'SparseIndices0' LoadMethod:
mat_indices.txt
mat_columns.txt
mat_rows.txt
The columns and rows file should contain annotation of columns
and rows of the matrix as one string on each line.
Example:
f=fopen('tmp_rows.txt','w'); fprintf(f,'1st row\n2nd row\n');
f=fopen('tmp_columns.txt','w'); fprintf(f,'1st col\n2nd col\n');
f=fopen('tmp_matrix.txt','w'); fprintf(f,'1 2\n3 4\n');
M = brede_read_txtmatrix('filename', 'tmp')
% With a file called abs_matrix.txt
Mabs = brede_read_txtmatrix('filename', 'abs');
See also BREDE, BREDE_READ_TXTLINES, BREDE_MAT.
$Id: brede_read_txtmatrix.m,v 1.10 2008/07/10 13:50:30 fn Exp $