作者amateuruser (( ・ω・`))
看板MATLAB
标题[讨论] 如何读取 excel 中 多个sheet的 同一个
时间Wed Dec 12 22:46:15 2018
如题
目前手边有一个excel raw data
Excel内部有多个sheet 且每个sheet都有装资料
请问一下如何利用loop回圈 将每一个sheet中固定储存格读取 且储存成vector or array ?
Ex:假设每个sheet都是A1这个储存格的data要取出来
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 27.247.225.215
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1544625979.A.AFE.html
1F:推 linkinflyer: 假设档名叫QQQ.xlsx,共10个sheet12/13 23:50
2F:→ linkinflyer: for i = 1:10 12/13 23:51
3F:→ linkinflyer: data(i) = xlsread('QQQ.xlsx',i,'a1')12/13 23:51
4F:→ linkinflyer: plot((1:10),data)12/13 23:51
5F:→ linkinflyer: 抱歉 plot前要加一个end12/13 23:52
感谢大大 我研究一下
※ 编辑: amateuruser (39.8.165.144), 12/14/2018 00:28:11
请问一下l大 我试了一下 好像还是有误耶
In an assignment A(:) = B, the number of elements in A and B must be the same.
显示是这样的
※ 编辑: amateuruser (39.8.165.144), 12/14/2018 00:34:46
刚才又改了一下
clear;
for i=1:10;
data(:,i)=xlsread('test.xlsx',i,'A1');
end;
不过错误变成这个:
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
※ 编辑: amateuruser (39.8.165.144), 12/14/2018 00:42:19