0
点赞
收藏
分享

微信扫一扫

MATLAB读取excel文件中的数据

MATLAB读取excel中的数据

读取sheet1中的数据

MATLAB读取excel文件中的数据_读取excel

    [num,txt,raw]=xlsread('C:\Users\Administrator\Desktop\test\a.xls')
    %num返回的是excel中的数据,txt输出的是文本内容,row输出的是未处理数据
    %一般情况下,我们读取的是excel中的数剧,所以可以直接用下面的,只输出数据矩阵便可
    [num]=xlsread('C:\Users\Administrator\Desktop\test\a.xls')

MATLAB读取excel文件中的数据_数据_02

读取指定sheet中的数据

如果想读取excel中的第二个sheet中的数据,可以输入下面命令

[num]=xlsread('C:\Users\Administrator\Desktop\test\a.xls',2)

MATLAB读取excel文件中的数据_desktop_03

MATLAB读取excel文件中的数据_数据_04

读取指定单元格中的数据

[num]=xlsread('C:\Users\Administrator\Desktop\test\a.xls',2,'A2:C5')

MATLAB读取excel文件中的数据_数据_05


举报

相关推荐

0 条评论