write_ascii
by Jacob
04 Feb 2013
(Updated 04 Feb 2013)
simple and elegant matlab function to quickly write large matrices to an ascii file.
|
Watch this File
|
| File Information |
| Description |
Writes large matrices to an ascii file. Format is up to user. Function automatically appends to file. It is many times (10-20X) faster than dlmwrite and almost as fast as using a mex file. Uses sprintf and fwrite (opposed to fprintf).
Example usage:
M = rand(1e5,3)*1000;
tic;dlmwrite('test.txt',M,'delimiter','\t','precision','%9.3f');toc;
tic;write_ascii('test2.txt',M,'\t','%9.3f');toc;
Elapsed time is 7.446049 seconds.
Elapsed time is 0.513611 seconds. |
| Required Products |
MATLAB
|
| MATLAB release |
MATLAB 7.13 (R2011b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 04 Feb 2013 |
added example usage in description |
|
Contact us