我想给变量一个数字,这样变量的名称就是带有变量名的数组的i th 组件。下面是 代码我想运行,但我不能。
varname = {'test1','test2'};
rangenameraw = {'A','B','C'};
rangenamecolstart = {'1','11'};
rangenameend = {'10', '20'};
for i = 1:1:length(varname)
varname(i) =xlsread(filename, strcat(rangenameraw,rangenamecolstart,':'rangenameraw,rangenameend);
end