The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]
Steven Lord

Posts: 2,237
Registered: 9/26/13
Re: Multiple files into Matlab from Excel
Posted: May 6, 2014 9:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Michelle " <> wrote in message
> "Steven Lord" <> wrote in message
> <lk86dd$5pb$>...


> Hi,
> thanks so much for the help, but I do not understand what you mean by ">
> Again, why? While it is possible to mix cell arrays and struct arrays,
> that

>> can get complicated really quickly. I recommend you stick with using cell
>> arrays alone."

You already have the data from your source files; you read them into the
cells of a.

>> > a{i}=xlsread(source_files(i).name)

This line is IMO unnecessary.

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

In my experience, newer users find it (relatively) easy to understand plain
old numeric arrays. Struct arrays aren't much more difficult, at least
scalar struct arrays. Cell arrays represent a significant step up in
difficulty of understanding, mainly because of the two different types of
indexing that look very similar but behave differently enough. A cell array
containing a struct array is even further up the learning curve. Since you
don't actually NEED to use a cell array containing a struct array (in that
you already have the data you would access that way in another form) I
recommend that you NOT use such a construct unless that requirement is being
imposed upon you (by your professor, if this is a homework or school lab
assignment; by the requirements of code that your code will call, if you
can't modify the downstream code; etc.)

Steve Lord
To contact Technical Support use the Contact Us link on

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.