我在 Matlab 的数据集中有大量横截面时间序列数据,我想根据标题提取数据数组(列),这些数据将从 for 循环中的另一个数组动态给出。任何人都可以建议如何在 Matlab 中实现这一点,我尝试了以下代码
cdslist = universe.Bond;
cdscount = length(universe.Bond);
for i=1:cdscount
cds = cdslist(i);
% here i want to use this variable cds to dynamically give names to a dataset called spread, for instance spread.cds where cds is changing in the loop.
end
这可能吗 ?谢谢您的帮助