[Master Index]
[Index for export/brede]
brede_read_csv2mat
(export/brede/brede_read_csv2mat.m)
Function Synopsis
M = brede_read_csv2mat(filename, varargin);
Help text
brede_read_csv2mat - Read comma separated file to 'mat' structure
M = brede_read_csv2mat(filename);
Input: filename filename
Property: ColumnHead [ {yes} | no ] Determines whether the
first row should be interpreted as a
header for the column.
DecimalSeparator [ {'.'} | ',' ] Type of decimal
separator
Delimiter [ {','} | ';' | character ]
Info [ {0} | An integer ] Amount of
debug/feedback information
RowHead [ {yes} | no ] Determines whether the
first column should be interpreted as a
header for the row.
Output: M 'Mat' structure
Read a comma-separated values (CSV) file into a 'mat'
structure.
The default seperator is the comma character but this can be
changed with the 'delimiter' property.
A file called "tmp.csv" and that contains
Age ; Binding
45 ; 2.2
32 ; 1.2
21 ; 1.1
may be read with
brede_read_csv2mat('tmp.csv', 'rowhead', 'no', 'delimiter', ';')
Example:
f=fopen('tmp.csv', 'w');
fwrite(f, sprintf('Age;Binding\n45;2.2\n32;1.2\n21;1.1'));
fclose(f);
M = brede_read_csv2mat('tmp.csv', 'rowhead', 'no', 'delimiter', ';')
brede_ui_mat(M)
See also BREDE, BREDE_READ, BREDE_MAT, BREDE_READ_TXTTABLE,
BREDE_UI_MAT.
$Id: brede_read_csv2mat.m,v 1.10 2008/06/05 19:00:15 fn Exp $
Cross-Reference Information
This function calls
This function is called by
Produced by mat2html on Fri Jun 20 17:43:05 2008
Cross-Directory links are: OFF