Read data into Matlab using URL -


I want to read Weather data directly from Weather Unground in Matlab, for a given site, you have data in the Seamia delimited format You can choose to output. How can I write a Matlab function in which information will be read in Matlab? I do not want to download the file, but read it from the URL.

For example, here's some data. Is there a static function in which there is a URL in the form of input and whoever gets there saves data?

is the function you are looking for. For example, the use of your URL above gives the following output:

  & gt; & Gt; Str = urlread ('http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=MC9780&format=1'); Str = Time, Temperature F, Dupoint, Pressure In, Wind Direction, Wind Directions Dagriz, WindspempMPH, Windspeed AugustMPH, Armament, Everly Precision, Conditions, Clause, Dareninin, Software Type & lt; Br> 2010-09-27 00: 09: 00,56.0,52.0,30.05, NNE, 25,0.0,3.0,86,0.00.00 ,,, 0.00, & lt; Br> 2010-09-27 00: 17: 00,56.0,52.0,30.05, NNE, 25,0.0,3.0,86,0.00.00 ,,, 0.00, & lt; Br> 2010-09-27 00: 28: 00,56.0,52.0,30.04, NNE, 30,2.0,5.0,85,0.00.00 ,,, 0.00, & lt; Br> ...  

Now you just have to parse the string output to get that information.

If you read from the URL and save it, instead of loading the file as a string variable, you can use the function.


Comments