Rank: 548 based on 126 downloads (last 30 days) and 4 files submitted
photo

Andres

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Andres View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Oct 2010 Screenshot index or subscript in datatip displays linear index (for vectors) or subscript (for arrays) of plotted data within the datatip Author: Andres data exploration, datatip, datatip text update f... 5 0
22 Jan 2010 Screenshot MuFFE - figure manager gui keep track of your figures and save them easily Author: Andres figure manager, gui, gui tools, figure, graphics export 7 0
17 Nov 2009 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres ascii, data import, import, data, file, read 110 32
  • 4.85714
4.9 | 28 ratings
09 Jul 2009 Screenshot surfo workaround for surface lighting with OpenGL Author: Andres plot, surf, surface, surface normals, opengl, light 4 1
  • 5.0
5.0 | 1 rating
Comments and Ratings by Andres View all
Updated File Comments Rating
06 Jun 2011 Loader of a .txt file to a MATLAB matrix Loads a content of a .txt file and stores it in a MATLAB matrix Author: Luka

Hi Luka,
welcome to the file exchange -- however there is already a submission called "txt2mat", http://www.mathworks.com/matlabcentral/fileexchange/18430-txt2mat . Would you please consider renaming (just) your .m-file? I think some users might get confused when they search the file exchange for txt2mat, especially since both files are to serve a similar purpose.
Kind regards
Andres

24 Nov 2010 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres

Hi arouabm Ben Mohamed,
I'm sorry, txt2mat does not support mixed string/numeric output in cells as e.g. textscan does. It would be quite hard (probably) to change this without sacrificing speed and R13 compatibility.
Btw, you can use some features of txt2mat (like line filtering) with read mode 'char' and use textscan afterwards (see example 3b).
Perhaps, if ease of use is more important than speed, you may find the fex submission "readtext" useful as well.

16 May 2010 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres

Thanks for your feedback. Indeed it would be nice to have a handy column selection input argument instead of using 'ConvString' with something like '%f %*f %f %*f %f'.
Regarding your memory issue, so far I can only refer to the 'NumericType' param and especially to example 6, but you probably found that in the doc already. txt2mat reads in the whole part of the file that is to be imported and initializes the output array. In an extreme case, a double array holding the data may consume about four times more memory than the file, unless some rows have missing values. I am thinking about making txt2mat more memory efficent - e.g. avoid slurping large files - without noticeably loosing speed (but tbh I have hardly any spare time now).

08 Apr 2010 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres

It would be most simple if you could uniquely identify every line of text by some string (or some few strings), as with 'tex' (or just 'x') in your example:

txt2mat('example.txt','BadLineString',{'tex'})

If that is not possible, you could read in all lines and then remove all NaN-only rows:

A = txt2mat('example.txt',0,'ReadMode','line')
A = A(any(isfinite(A),2),:)

If things are more complex, you may also contact me via the 'Contact Author' link. Good luck!

02 Feb 2010 Convert TDMS (v2) Import a TDMS v2 file as a matlab object (ob). Author: Grant Lohsen

I did not test convertTDMS.m extensively, but I'll give it 5 stars as it worked with my files without any problem. Thanks, Grant!

Comments and Ratings on Andres' Files View all
Updated File Comment by Comments Rating
01 Feb 2012 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres Suleiman, Amr
12 Jan 2012 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres Ramaker, Henk-Jan

Superb file! Really great! The speed and flexibility is impressive. However, i'm experiencing some troubles. When I read this txt file:

Symbol,Date
XXH00,09/221999

it works great! But, when I read this txt file:

Symbol,Date
ESH00,09/221999

txt2mat cannot read any lines. I discovered, when the 2nd line starts with an 'E' or 'N', txt2mat somehow cannot match the format.

Is there a way around this or to fix this problem?

15 Nov 2011 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres Thomas

I wasted 3 hours searching for a solution to my problem before I stumbled upon this beauty! Thanks so much for all the effort you put into this. Good explanation and examples to get you started. Part of my permanent function collection..

14 Feb 2011 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres ESTEBAN

It works nice and smooth importing DEM (digital elevation models)...Thanks a lot

15 Dec 2010 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres Pedro, Juan

Great job

Top Tags Applied by Andres
ascii, conversion, csv, data, data exploration
Files Tagged by Andres View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Oct 2010 Screenshot index or subscript in datatip displays linear index (for vectors) or subscript (for arrays) of plotted data within the datatip Author: Andres data exploration, datatip, datatip text update f... 5 0
22 Jan 2010 Screenshot MuFFE - figure manager gui keep track of your figures and save them easily Author: Andres figure manager, gui, gui tools, figure, graphics export 7 0
17 Nov 2009 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres ascii, data import, import, data, file, read 110 32
  • 4.85714
4.9 | 28 ratings
09 Jul 2009 Screenshot surfo workaround for surface lighting with OpenGL Author: Andres plot, surf, surface, surface normals, opengl, light 4 1
  • 5.0
5.0 | 1 rating

Contact us at files@mathworks.com