Read csv data from multiple websites in for loop
显示 更早的评论
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,
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!