|
|
| File Information |
| Description |
As txt2mat basically is a wrapper for sscanf, it quickly converts ascii files containing m-by-n numeric data, allowing for header lines. When encountering lines with different numbers of data elements, it will work line-by-line and thus slow down somewhat.
You may let txtmat carry out an automatic data layout analysis on comparatively 'simple' text files (header lines + decimal number data with common delimiters). By this analysis it is able to directly import most .csv-files, for instance.
As txt2mat can perform string replacements before the numeric conversion is done, it can cope with many irregularities within the data. By that it is also capable of detecting and handling commas as decimal characters (common german notation).
You can filter out bad data lines by keywords, provide appropriate format strings (as for sscanf), or split up the import process for huge files if you encounter memory problems (e.g. a typical regular 40MB file should be imported as a whole within less than 10s on most computers).
txt2mat is intended to work on Matlab R13 and newer versions.
Comments and suggestions welcome.
Andres |
| Acknowledgements |
This submission has inspired the following:
readMM_2D
|
| MATLAB release |
MATLAB 7.7 (R2008b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (10) |
| 29 Jan 2008 |
vincenzo ficco
|
|
|
| 29 Jan 2008 |
Florian H
|
|
|
| 24 Apr 2008 |
Wladimir Alonso
|
|
|
| 23 May 2008 |
K AM
|
|
|
| 01 Jun 2008 |
wu zhiyong
|
|
|
| 02 Jun 2008 |
Andres T.
|
|
|
| 27 Aug 2008 |
rodrigo abarca del rio
|
|
|
| 17 Oct 2008 |
djr djr
|
|
|
| 03 Nov 2008 |
Ralf
|
|
|
| 11 Nov 2008 |
Zahra
|
|
|
| Updates |
| 08 Feb 2008 |
v05.61
|
| 03 Mar 2008 |
v05.62 |
| 07 Apr 2008 |
v05.86 |
| 20 May 2008 |
v05.86.1 |
| 21 May 2008 |
v05.90 |
| 27 May 2008 |
v05.96 |
| 26 Jun 2008 |
v05.97 |
| 28 Aug 2008 |
v06.00 · introduction of read mode 'block' · 'MemPar' buffer value changed to scalar · reduced memory demand · modified help |
| 03 Nov 2008 |
v06.01 · fixed bug: possible error message in file analysis when only header line number is given |
| 02 Dec 2008 |
v06.04 · better handling of replacement strings containing line breaks (initiated by DS) · allow '*' wildcard in file name |
|
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.
Contact us at files@mathworks.com