Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How do I loop through a list of stock tickers in Matlab?
  2. Stocks = {'JPM','KO','GOOG','PG'};
  3.     for Stock = Stocks;
  4.         stockData.(Stock) = load(Stock '.csv');
  5.     end
  6.        
  7. Stocks = {'JPM','KO','GOOG','PG'};
  8. for i = 1:length(Stocks);
  9.     load([Stocks{i}, '.csv'])
  10. end