Effacer les filtres
Effacer les filtres

Why am I getting "Undefined Function or variable" error in a Datafeed toolbox Function when trying to get data from Yahoo?

1 vue (au cours des 30 derniers jours)
I'm using Datafeed toolbox to get data from Yahoo on multiple tickers. I'm using the syntax that's indicated in the documentation and that have worked well until now. I've tried with different tickers and tried multiple times at the command line changing to caps, or placing ' ' around the c character. None have worked. Here the code: ticker={'AAPL' 'AXP' 'BA' 'CAT' 'CSCO' 'CVX' 'DD' 'DIS' 'GE'... 'GS' 'HD' 'IBM' 'INTC' 'JNJ' 'JPM' 'KO' 'MCD' 'MMM' 'MSFT' 'MRK' 'NKE'... 'PFE' 'PG' 'TRV' 'UNH' 'UTX' 'V' 'VZ' 'WMT' 'XOM'}; c=yahoo; for i=1:30 Precio.(ticker{i})= fetch(C,ticker(i),'AdjClose','Dec 1 01','Dec 1 15','m'); %Crea una variable temporal y asigna los precios temp=Price(ticker{i}); %Crea el vector de cierres solo con los precios Cierre(:,i)=temp(:,2); end
I get this: Error using yahoo/fetch (line 133) Input argument error.
Undefined function or variable 'C'.

Réponse acceptée

Steven Lord
Steven Lord le 11 Déc 2015
The variable named C is a different variable than the variable named c. Case matters.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by