Optimization; Getting rid of the for loop

I have the following code that I would like to optimize but i don't know how.
l = length(tickers);
prices = zeros( l, 1);
for i = 1:l
prices(i) = Data.(i);
end
where Data is a table. I was wondering if there is any way I could get rid of the for loop.

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Optimization Toolbox についてさらに検索

製品

リリース

R2018b

質問済み:

2018 年 10 月 12 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by