matlab xlsread
时间: 2023-09-25 15:08:17 浏览: 71
The xlsread function in MATLAB is used to read data from an Excel file (.xls or .xlsx) into MATLAB. It allows the user to select a range of cells or an entire worksheet to import. The syntax for xlsread is:
[data, txt, raw] = xlsread(filename, sheetname, range)
where:
- data is a numeric array containing the numeric data from the specified range
- txt is a cell array containing the text data from the specified range
- raw is a cell array containing the raw data from the specified range, including both numeric and text data
- filename is the name of the Excel file to read
- sheetname is the name of the worksheet to read data from (optional)
- range is the range of cells to read (optional)
Example usage:
[data, txt, raw] = xlsread('data.xlsx', 'Sheet1', 'A1:C10');
This reads the data from cells A1 to C10 in the first sheet of the file data.xlsx, and stores the numeric data in the variable data, the text data in txt, and the raw data in raw.
阅读全文
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)