Read csv data from multiple websites in for loop
Show older comments
I'm trying to read csv data from a website using the urlread command. I can do this successfully if I just want to read in data from one station. However, I would like to be able to do this for multiple stations simultaneously. Because the only thing that changes in the url as I go from one station to the next is the 3-character id (shown below), I figure this could be done somehow in a for loop.
Here is what I have so far:
url_start = {'text_a'};
url_end = {'text_b'};
id={'abc';'bcd';'cde';'def';'efg';'fgh'};
url=cell(6,1);
for i = 1:6
url{i} = strcat(url_start,id{i},url_end);
end
Does anyone know how I can now use the urlread on the newly created 'url' so I can read data from multiple webpages simultaneously? Thanks,
Accepted Answer
More Answers (1)
Kurt
on 15 Aug 2014
0 votes
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!