For loop Bloomberg BDP Output
显示 更早的评论
Hi all,
kind of a simple question here as I am new to Matlab, but searching on the web didn´t help me either.
I have a table with ISINs in the first column. I want to get the last price of the given ISINs in the second column with the BDP function. But the output of the BDP function is not a number but a 2x2 array with the relevant information in (2,2).
Heres my code
for i = 1:size(pf,1)
pf(i,2) = bdp(pf{i,1}, 'Corp';'PX_LAST')
end
Its the same if I use cellfun:
pf(:,2) = bdp(cellfun(@(x) [x, 'Corp'],pf(:,1),'UniformOutput', false), 'PX_LAST');
Is there any way to make sure that the result is only (2,2) of the outputarray of the bdp function?
cheers,
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!