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: Multiple files into Matlab from Excel
Replies: 15   Last Post: May 9, 2014 2:06 AM

Advanced Search

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

Posts: 8
Registered: 5/3/14
Re: Multiple files into Matlab from Excel
Posted: May 4, 2014 10:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

TideMan <mulgor@gmail.com> wrote in message <71a64752-a41e-4205-a72d-70cbd854c5ee@googlegroups.com>...
> On Monday, May 5, 2014 1:10:07 AM UTC+12, Michelle wrote:
> > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <lk5cqf$8di$1@newscl01ah.mathworks.com>...
> >

> > >
> >
> > > > Hi Bruno,
> >
> > > >
> >
> > > > How would I do that, I have tried using cells but it always gets errors.
> >
> > > >
> >
> > >
> >
> > > Use {} instead of [].If you have any specific error/issue then post the code.
> >
> > >
> >
> > > Bruno
> >
> >
> >
> > Hi,
> >
> >
> >
> > I did try that before but with the same code it did not work.
> >
> >
> >
> > :(

>
> Show us the code you tried that didn't work.



Thanks,

source_dir='/Users/MichelleTommosgard/Desktop/test';

source_files=dir(fullfile(source_dir,'*.xlsx'));


n=length(source_files);

i=n;
a=cell(n);



for i=1:n

if i<=n
a{i}=xlsread(source_files(i).name)

split=strsplit(source_files(i))

aa{1+i}.data=xlsread(source_files(i+1).name);

end

end



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.