0
我在Matlab中的數據集中有大量的橫截面時間序列數據,我想根據頭部提取數據數組(列),這些數據將從for循環中的另一個數組動態給出。任何人都可以建議如何在Matlab中實現這一點,我曾嘗試下面的代碼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
這可能嗎? 感謝您的幫助
你甚至可以不用了'cds',只需使用:'傳播(cdslist(。 i))' – Schorsch
你能澄清什麼是數據? –
事情已經作爲橫截面數據的數據集已經存在,我想從安全名稱中提取數據,例如cdslist給出的「X」 –