看板 MATLAB 關於我們 聯絡資訊
如題 目前手邊有一個excel raw data Excel內部有多個sheet 且每個sheet都有裝資料 請問一下如何利用loop迴圈 將每一個sheet中固定儲存格讀取 且儲存成vector or array ? Ex:假設每個sheet都是A1這個儲存格的data要取出來 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.247.225.215 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1544625979.A.AFE.html
linkinflyer: 假設檔名叫QQQ.xlsx,共10個sheet12/13 23:50
linkinflyer: for i = 1:10 12/13 23:51
linkinflyer: data(i) = xlsread('QQQ.xlsx',i,'a1')12/13 23:51
linkinflyer: plot((1:10),data)12/13 23:51
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