Read csv data from multiple websites in for loop
Mostrar comentarios más antiguos
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,
Respuesta aceptada
Más respuestas (1)
Kurt
el 15 de Ag. de 2014
0 votos
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!