Home > brede > brede_read_txtmatrix.m

brede_read_txtmatrix

PURPOSE ^

brede_read_txtmatrix - Read a 'Mat' structure from text files.

SYNOPSIS ^

function M = brede_read_txtmatrix(varargin)

DESCRIPTION ^

 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 $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005