I have a matlab开发者_JAVA百科 GUI....I'd like to load ANY file type(doc,txt,dat,xls) into matlab as a matrix through the GUI...I'd appreciate any help I can get!!
DOC, XLS, DAT to txt
As you might have realised by now, .doc are not plain-text. AFAIK, Matlab doesn't have any method to natively read these files. Hence, i suggest you do the following:
.txt go ahead and implement your GUI to read and intrepret Matrix-data from a .txt file.
You might want to refer this:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/dlmread.html
.xls USe the xlsread() function in MATLAB. Documentation below:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlsread.html
.doc files, Save as .txt and use the above .txt loader you implemented already.
.dat is not a standard extension several kinds of apps use .dat files and the internal format is different in all cases. (Post me a sample standard .dat file if U have one and i'll try and get back to you as to how to parse it in matlab.)
GoodLUCK!!
精彩评论