How to read excel in MATLAB

Source: Internet
Author: User

Excel is a common office automation software, with many advantages, as a commonly used measurement software, with storage data convenient, practical advantages, but its matrix operation is not as powerful as MATLAB, the following introduction to import Excel data into Matlab

    1. The Excel table to be read first is placed under the current working path
    2. Command Window Input [Number,txt,raw]=xlsread (' file.xlsx ');

Note: The number in the above formula contains the data in File.xls, not the header, or Nan if a character with non-numeric characters is encountered;

TXT contains all non-numeric characters in the File.xls, including the table header, and the number is null;

Raw is stored in the raw data in File.xls, without any processing, and also with the header.

File is the name of the Excel table you want to read;

office2003 the Excel file type is File.xls

Input parameters. xls can not be written; output parameters can be default, only one parameter only takes a number, two characters;

Number, TXT, raw can be changed to another name;

Here's a chestnut:

We want to read the Excel table named Aa.xlsx in the current working directory:

Enter [Number,txt,raw]=xlsread (' aa.xlsx ') in command window or other code windows

And then there's the result:

Now we have the data we want to import in workspace.

How to read excel in MATLAB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.