You are not logged in.
login | register

Discussion: All Topics
Topic: optimization Matlab

Post a new topic to the Research Area Discussion discussion
<< see all messages in this topic
<previous message    

Subject:   RE: optimization Matlab
Author: Si
Date: Aug 12 2004
On Aug 12 2004, Ben3000 wrote:
How could I call
> Excel Data from a Matlab programm? I would be very grateful if
> somebody could send to me an example of Matlab Code to afford it.

First search the internet, there are some FREE GENETIC MatLab toolboxes (codes)

Second, try typing on the MatLab command prompt the following statement:

 help xlsread

That will give you of how to read Excel from MatLab , which gives the following
, which the MatLab codes is pretty much shown after typing the above help



XLSREAD read Excel spreadsheet (XLS) file.
    A = XLSREAD('FILENAME') returns in A, numeric data from the first sheet
    the Excel file FILENAME.
    [A, B] = XLSREAD('FILENAME') returns numeric data, stored in A, and text

    data, stored in B.
    [...] = XLSREAD('FILENAME','SHEETNAME') is the same as above but uses the

    sheet named SHEETNAME.  XLSREAD throws an error if SHEETNAME does not
    Empty cells or cells with text result in NaN elements in the returned
    Leading rows and columns of text do not create NaN elements in the
    result.  This makes it easier to load files that look like this:
    Time   Temp
     12      98
     13      99
     14      97
    City    Time   Temp
    Dallas   12      98
    Tulsa    13      99
    Boise    14      97
    To get available sheet names from file, call XLSFINO with two outputs.
    For example:
    [status, sheetNames] = xlsfinfo(FILENAME)
    When reading date fields from Excel files, the date numbers need
    conversion to a MATLAB date.  For example, if your Excel file contains:
    Convert the data to MATLAB dates like this:
    excelDates = xlsread(FILENAME)
    matlabDates = datenum('30-Dec-1899') + excelDates


Reply to this message          Quote this message when replying?
yes  no
Post a new topic to the Research Area Discussion discussion

Discussion Help