Excel file read and manipulate - Matlab

Discussion in 'Programmer's Corner' started by Judas543, Apr 24, 2010.

  1. Judas543

    Thread Starter Member

    Jan 26, 2010
    60
    0
    Before I post something about this:

    does anyone know how to read an excel file with matlab and manipulate it?

    I know how to open it and put it in different categories:

    [num txt raw] = xlsread('c:\matches.xls')

    NEED HELP ON THESE THOUGH:

    Count the number of entries that have one blank field

    Copy these entries in a new array that you display in order to review and verify the errors

    Finally you decide to remove these defective entries from your array (for which one field was left blank) by
    copying only the valid entries to a new array, which is going to be your working database





    http://www.sendspace.com/file/q1dp3j - excel file .xls
     
    Last edited: Apr 24, 2010
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Does the file have to be saved as an Excel file?

    Can you save it as a comma delimited format, then import the data?
     
  3. Judas543

    Thread Starter Member

    Jan 26, 2010
    60
    0
    i believe it has to be saved as an excel file
     
  4. Judas543

    Thread Starter Member

    Jan 26, 2010
    60
    0
    actually maybe i can copy and paste into a text file and read it from there?
     
  5. johndoe45

    Member

    Jan 30, 2010
    364
    1
    you can choose save as text file like retched said from excel

    than comma delimit it.

    open text with matlab

    in matlab

    load filename.txt

    that is it. then just put filename(row numbers,column numbers)

    for example i want all data in column 1
    matlab syntax

    filename:),1)
     
  6. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    What's the problem with xlsread? It's pretty convenient...
     
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Aww, thats too easy. :rolleyes:
     
Loading...