Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Matlab 浏览 Excel 工作表的所有单元格,但我的代码中断了
s1 = 'A2'; s2 = 'F2'; x2 = xlsread('text.xlsx',[s1, ':', s2]) for i=1:3 s1 = s1+1; s2 = s2+1; x2 = xlsread('text.xlsx',[s1, ':', s2]) end
你想增加行的索引:
for i=2:5 s1=['A',num2str(i)]; s2=['F',num2str(i)]; x2 = xlsread('text.xlsx',[s1, ':', s2]) end