matlab读取excel其中一列数据,并设定其为某一变量怎么做?
就像图中程序一样,想设两个输入,从excel中调入。...
就像图中程序一样,想设两个输入,从excel中调入。
展开
我来答
可选中1个或多个下面的关键词,搜索相关资料。也可直接点“搜索资料”搜索整个问题。
南北186
推荐于2019-11-04
·
TA获得超过9.1万个赞
知道小有建树答主
回答量:114
采纳率:100%
帮助的人:5.7万
关注
如果数据文件为excel文件(xls或者xlsx格式的文件),如下图所示的数据文件。

只需要使用MATLAB中提供的系统函数xlsread函数即可,其主要的调用形式为a=xlsread('filename.xls');
其中a表示读入文件所保存的变量名称,filename.xls(或者filename.xlsx)表示excel数据文件,help帮助文档中对xlsread函数的 。

使用下面的命令进行读取。

数据文件保存在excel的某个sheet中。

需要把某个变量的存储的数据写入到excel文件。

只需要使用MATLAB中提供的系统函数xlswrite()函数即可。

使用下面的命令进行读取。
收起
为你推荐: