I have found the functionality of being able to read data from a .txt file and storing them in a MATLAB matrix as quite useful and needed.
Example application: imagine you having some data stored in a .txt file (from some measurements) and you want additionally to process them, visualize or just save. This code does that.
This code is very similar to what load does. But, in this case one is able to add a bit customized functionality to my code to suit their specific needs.
Note: It assumes existence of only numeric data in a .txt file.
MATRIX = txt2mat('data000.txt')
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.
I gave you a framework, use it as you wish.
Luka, twice you've said "one is able to add a bit customized functionality" - it would be more informative if you gave some example of what extra functionality you provide.
Yes, in deed. But in this case one is able to add a bit customized functionality to my code to suit their specific needs.
Same like matlab-own "load" function.
abc = load('data000.txt');
Updated description of the file
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.