For loop Bloomberg BDP Output
Show older comments
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,
Answers (0)
Categories
Find more on Bloomberg Desktop 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!