urlread for links in html database

1 Ansicht (letzte 30 Tage)
Eric
Eric am 23 Mai 2023
Bearbeitet: Rik am 23 Mai 2023
Hello, I would like to extract .dat files for an entire year long web directory. I can use urlread to extract individual daily files:
However there are 365 of these files for each year long directory and I would like to write a script to extract all of the sub url's form a site like this:
I'm quite new to programming in matlab and searched the forums extensively before posting, so sorry if this has already been answered and thanks for any help!

Antworten (1)

Rik
Rik am 23 Mai 2023
Bearbeitet: Rik am 23 Mai 2023
You can use sprintf to form the URLs.
n=21001;
url=sprintf('%s%d.dat','https://gml.noaa.gov/aftp/data/radiation/solrad/abq/2021/abq',n);
Now you can use the URL in urlread (or webread). You can easilly put this code in a loop if you like.
Feel free to let me know if you need more help implementing this.

Kategorien

Mehr zu Downloads finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by