Show older comments
各位大佬好,我有20个数组,分别是DOY_01,DOY_02, DOY_03.... DOY_20, 他们都是100x1的double数组,比如DOY_01:1
2
4
6
10
....
我想把DOY_01,DOY_02, DOY_03... 分别当做索引idx,提取数组A、B、C... 的值,所以写了这样一个函数
for i =1:20
a=A(strcat('DOY_', num2str('i','%02d')));
end
但是我这样构造出来的是字符串'DOY_n', 而不是double数组 DOY_n, 请问我该怎么构造 DOY_n?
Accepted Answer
More Answers (0)
Categories
Find more on 运算符和基本运算 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!