×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

From Excel to Matlab

From Excel to Matlab

From Excel to Matlab

(OP)
I have a two dimensional array in excel such that each cell has a different number of elements separated by commas. For example

Cell A1 has   1.5,201,202,400
Cell B1 has   1.5,202,3000,400,170,190,5.6

Is there an effecient way or command which will bring this data into matlab in the form of cell arrays consisting of either numbers of strings.

I tried using [A,data4] = xlsread('filename') but that does seem to work for two dimensional array in this situation.

Please let me know if this question is 'clear as mud' and I will try to re-explain. Thanks

RE: From Excel to Matlab

Works for me. data4 becomes a cell array with 2 elements: contents of A1 and contents of B1.

To get numbers from this, use str2num(data4{1}) and str2num(data4{2})   

Those are curley braces around the 1 and 2.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources