Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Automating Copy/Paste with MATLAB
Replies: 3   Last Post: Aug 7, 2013 3:15 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
GIRAY

Posts: 11
Registered: 1/16/10
Re: Automating Copy/Paste with MATLAB
Posted: Aug 7, 2013 2:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The issue with my data file is that it contains a header block with useless information for about 10 rows, then the delimited data comes. So using dlmread is fails, because the data itself cannot be acquired by dlmread.



"someone" wrote in message <ktu40r$g9p$1@newscl01ah.mathworks.com>...
> "GIRAY" wrote in message <ktu28p$b3u$1@newscl01ah.mathworks.com>...
> > Howdy Folks,
> >
> > I like to work with Excel workbooks when I am processing long data files, because xlsread function nicely organizes rawdata, textdata and numeric data into variables.
> >
> > I am, however, unable to process long files with excel due to memory errors and the limit of rows excel dictates.
> >
> > Let's forget about the limit of usable rows with excel for now, and assume that I have 200 rows of data on a .dat (or .txt) format which needs to be processed.
> >
> > I have created algorithms to use with xlsread function that I don't want to rewrite for dlmread or textread functions. I want Matlab to automatically read in that txt or dat file and paste it into a excel file, so essentially, the question is, how can I convert a text file to an excel workbook automatically under Matlab? I want to avoid that primitive copy/paste method that I do by hand by utilizing Matlab.
> >
> > How can I approach this problem?
> >
> > Thanks.

>
> Maybe I'm missing something, but it seems to me that a two line m-file should do the trick. Something like:
>
> function CreateXLS(filenameIn,fileNameOut)
> M = dlmread(filenameIn); % include options you need
> xlswrite(filenameOut,M)




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.