Basic for loop and Function
Mostra commenti meno recenti
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 Commenti
Bob Thompson
il 12 Feb 2019
What problems are you having with this script?
Bob Thompson
il 12 Feb 2019
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
il 13 Feb 2019
Modificato: Stephen23
il 13 Feb 2019
Risposta accettata
Più risposte (1)
Andrew Czeizler
il 13 Feb 2019
2 Commenti
Bob Thompson
il 13 Feb 2019
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
il 15 Feb 2019
Categorie
Scopri di più su Code Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!