Basic for loop and Function
이전 댓글 표시
Hi All,
I am trying to do a basic for loop over stock tickers to download data.
The data should be kept in seperate tables in the workspace.
my attempt -
tickers = {'SPY', 'AAPL'};
for i = length(tickers);
T(i)=F_Alphavantage('time_series_daily_adjusted', 'symbol', tickers{i}, 'outputsize', 'full')
end
댓글 수: 3
Bob Thompson
2019년 2월 12일
What problems are you having with this script?
Bob Thompson
2019년 2월 12일
Is F_AlphaVantage a script that you wrote, something you found elsewhere, or a built-in MATLAB function? I'm not familiar with it.
Based on the error message, it seems that the error is with the warning function. I would suggest looking up the documentation for that to troubleshoot why it's rejecting the input. There may be a small error with parenthesis, or quotes.
Andrew Czeizler
2019년 2월 13일
편집: Stephen23
2019년 2월 13일
채택된 답변
추가 답변 (1개)
Andrew Czeizler
2019년 2월 13일
댓글 수: 2
Bob Thompson
2019년 2월 13일
My best suggestion is to include cell indexing on your output.
SPY_Daily_Close_Adj{index} = ...
If you are doing that already then please elaborate more on what difficulties you're having.
Andrew Czeizler
2019년 2월 15일
카테고리
도움말 센터 및 File Exchange에서 Code Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!