I have a matlab 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!!
I have a matlab GUI….I’d like to load ANY file type(doc,txt,dat,xls) into matlab as
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.
.xls USe the xlsread() function in MATLAB. Documentation below:
.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!!