Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB xlsread function

  1. Dec 7, 2009 #1
    MATLAB "xlsread" function

    Hello

    I am trying to import some data from an Excel spreadsheet, however the range is a variable in my code. For example, I have "t" and "b" as numbers which specify the top and bottom rows of the data I need.

    For example I need:

    A = xlsread('test.xls','A3:A10');

    however I need to to import, in general, A"t" to A"b", where t and b are the row numbers.

    The Excel file is very large (>10^5 rows) so I would very much like to avoid importing the entire spreadsheet and then filtering it MATLAB.

    Thanks for any help,
    Mike
     
  2. jcsd
  3. Dec 7, 2009 #2
    Re: MATLAB "xlsread" function

    You can use the "sprintf()" function in MATLAB to create the necessary input string.

    It is very similar to the C version in terms of usage. If you haven't used it, just search through the MATLAB help documentation.
     
  4. Dec 7, 2009 #3
    Re: MATLAB "xlsread" function

    Hello, that is brilliant, does exactly what I need. Thanks a lot.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MATLAB xlsread function
  1. MATLAB and xlsread (Replies: 3)

  2. MATLAB xlsread (Replies: 0)

  3. Matlab functions (Replies: 0)

  4. Matlab functions (Replies: 0)

  5. MATLAB function (Replies: 1)

Loading...