<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Read data from the web with URLREAD</title>
	<atom:link href="http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/</link>
	<description>Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.</description>
	<lastBuildDate>Fri, 10 Feb 2012 20:31:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ritesh</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2941</link>
		<dc:creator>Ritesh</dc:creator>
		<pubDate>Sun, 11 Dec 2011 15:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2941</guid>
		<description>Hi,

I want to read data(download an excel file) from a website. The data is not open source. I have to log in first with password and then only I can access data through a web browser. 

How can I download the same file through urlread command?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to read data(download an excel file) from a website. The data is not open source. I have to log in first with password and then only I can access data through a web browser. </p>
<p>How can I download the same file through urlread command?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2438</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Tue, 09 Nov 2010 19:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2438</guid>
		<description>Thisara,

Can you read the files if they were local?  Can you use the FTP command to bring them local?

Doug</description>
		<content:encoded><![CDATA[<p>Thisara,</p>
<p>Can you read the files if they were local?  Can you use the FTP command to bring them local?</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thisara</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2435</link>
		<dc:creator>Thisara</dc:creator>
		<pubDate>Tue, 09 Nov 2010 00:01:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2435</guid>
		<description>Hi Doug,
Thanks for the nice piece of work. I am trying to download some netcdf data from web. I tried to use urlread, but couldn&#039;t success.File can not be scanned as you did.
But if I can download the netcdf file, I can read it through Matlab in my computer.

Is there any other way to download the netcdf file through Matlab ?

Cheers
Thisara

this is the location of data :
http://opendap-tpac.arcs.org.au/thredds/catalog/library/argo_australia/aoml/5900607/profiles/catalog.html?dataset=library/argo_australia/aoml/5900607/profiles/D5900607_001.nc</description>
		<content:encoded><![CDATA[<p>Hi Doug,<br />
Thanks for the nice piece of work. I am trying to download some netcdf data from web. I tried to use urlread, but couldn&#8217;t success.File can not be scanned as you did.<br />
But if I can download the netcdf file, I can read it through Matlab in my computer.</p>
<p>Is there any other way to download the netcdf file through Matlab ?</p>
<p>Cheers<br />
Thisara</p>
<p>this is the location of data :<br />
<a href="http://opendap-tpac.arcs.org.au/thredds/catalog/library/argo_australia/aoml/5900607/profiles/catalog.html?dataset=library/argo_australia/aoml/5900607/profiles/D5900607_001.nc" rel="nofollow">http://opendap-tpac.arcs.org.au/thredds/catalog/library/argo_australia/aoml/5900607/profiles/catalog.html?dataset=library/argo_australia/aoml/5900607/profiles/D5900607_001.nc</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2038</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Tue, 27 Apr 2010 18:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2038</guid>
		<description>@Paul,

I like the following:

&lt;pre class=&quot;code&quot;&gt;

urlwrite(&#039;http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&amp;req_state=NA&amp;req_statename=NA&amp;format=1&#039;,&#039;data.csv&#039;);
[num, txt] = xlsread(&#039;data.csv&#039;);

&lt;/pre&gt;

You now have num and txt.  These can be parsed pretty easily, especially if the format of all of these are always the same.

I actually like pulling the data locally into a file and then reading it in.  Something about having the file close by, even if in a temporary file that you toss later feels right.

-Doug</description>
		<content:encoded><![CDATA[<p>@Paul,</p>
<p>I like the following:</p>
<pre class="code">

urlwrite('<a href="http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1&#039;,&#039;data.csv" rel="nofollow">http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1&#039;,&#039;data.csv</a>');
[num, txt] = xlsread('data.csv');
</pre>
<p>You now have num and txt.  These can be parsed pretty easily, especially if the format of all of these are always the same.</p>
<p>I actually like pulling the data locally into a file and then reading it in.  Something about having the file close by, even if in a temporary file that you toss later feels right.</p>
<p>-Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2037</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Tue, 27 Apr 2010 15:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2037</guid>
		<description>To those asking about converting the string data to matrix data, str2double worked for me.  Somewhere somebody recommends to save the string as a csv and then read the csv back into Matlab, but this seems very roundabout to me.</description>
		<content:encoded><![CDATA[<p>To those asking about converting the string data to matrix data, str2double worked for me.  Somewhere somebody recommends to save the string as a csv and then read the csv back into Matlab, but this seems very roundabout to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2036</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Mon, 26 Apr 2010 21:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-2036</guid>
		<description>Thanks Doug, great tutorial.  I&#039;m trying to do something similar, which I know is possible, but just a bit beyond my matlab ability.  I am trying to extract historical wind data from a website, and while it is comma separated, it is a mixture of words, numbers, and annotations.  I can get the data into matlab, but I can&#039;t figure out how to (1) save the data as a csv file for archiving, (2) extract specific parts of the block (like hour), and (3) turn the data into variables (double?) on which I can do math.  I have found several possible solutions but keep getting stuck on one part or another.  I think I could do it in a way that would require a ton of loops and if/then statements, but since I want to mine data from many websites, this would likely get slow.  Any help would be much appreciated.  THANK YOU!!  Here&#039;s my start:


block=urlread(&#039;http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&amp;req_state=NA&amp;req_statename=NA&amp;format=1&#039;);
data=textscan(block,&#039;%s %s %s %s %s %s %s %s %s %s %s %s&#039;,&#039;delimiter&#039;,&#039;,&#039;);

urwrite(&#039;http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&amp;req_state=NA&amp;req_statename=NA&amp;format=1&#039;,data.csv&#039;);
data = csvread(&#039;data.csv&#039;);

data2=textscan(block,&#039;%s %s&#039;,&#039;delimiter&#039;,&#039;:&#039;);

clear block
points=length(data{1});
dataTime=data{1}(2:points-1);
dataTemperature=data{2}(2:points-1);
dataHumidity=data{3}(2:points-1);
dataWindDirection=data{7}(2:points-1);
dataWindSpeedAvg=data{8}(2:points-1);
dataWindSpeedGust=data{9}(2:points-1);

dataHour=data2{1}(2:points-1);</description>
		<content:encoded><![CDATA[<p>Thanks Doug, great tutorial.  I&#8217;m trying to do something similar, which I know is possible, but just a bit beyond my matlab ability.  I am trying to extract historical wind data from a website, and while it is comma separated, it is a mixture of words, numbers, and annotations.  I can get the data into matlab, but I can&#8217;t figure out how to (1) save the data as a csv file for archiving, (2) extract specific parts of the block (like hour), and (3) turn the data into variables (double?) on which I can do math.  I have found several possible solutions but keep getting stuck on one part or another.  I think I could do it in a way that would require a ton of loops and if/then statements, but since I want to mine data from many websites, this would likely get slow.  Any help would be much appreciated.  THANK YOU!!  Here&#8217;s my start:</p>
<p>block=urlread(&#8216;<a href="http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1" rel="nofollow">http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1</a>&#8216;);<br />
data=textscan(block,&#8217;%s %s %s %s %s %s %s %s %s %s %s %s&#8217;,'delimiter&#8217;,',&#8217;);</p>
<p>urwrite(&#8216;<a href="http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1&#039;,data.csv" rel="nofollow">http://www.wunderground.com/history/airport/KSVC/2010/4/1/DailyHistory.html?req_city=NA&#038;req_state=NA&#038;req_statename=NA&#038;format=1&#039;,data.csv</a>&#8216;);<br />
data = csvread(&#8216;data.csv&#8217;);</p>
<p>data2=textscan(block,&#8217;%s %s&#8217;,'delimiter&#8217;,':&#8217;);</p>
<p>clear block<br />
points=length(data{1});<br />
dataTime=data{1}(2:points-1);<br />
dataTemperature=data{2}(2:points-1);<br />
dataHumidity=data{3}(2:points-1);<br />
dataWindDirection=data{7}(2:points-1);<br />
dataWindSpeedAvg=data{8}(2:points-1);<br />
dataWindSpeedGust=data{9}(2:points-1);</p>
<p>dataHour=data2{1}(2:points-1);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1877</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Mon, 22 Feb 2010 21:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1877</guid>
		<description>@Need Help

The command does return the data as one big string.  When you say:

&quot;I was wondering if there is a function which converts it into a string&quot;

What do you mean?

What would a typical return from URLREAD() look like so we know what you are getting and what would the desired output look like?

Doug</description>
		<content:encoded><![CDATA[<p>@Need Help</p>
<p>The command does return the data as one big string.  When you say:</p>
<p>&#8220;I was wondering if there is a function which converts it into a string&#8221;</p>
<p>What do you mean?</p>
<p>What would a typical return from URLREAD() look like so we know what you are getting and what would the desired output look like?</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Need Help</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1876</link>
		<dc:creator>Need Help</dc:creator>
		<pubDate>Mon, 22 Feb 2010 21:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1876</guid>
		<description>Hi Doug, I have a question. I want to know a way to convert the string you obtain from using urlread() into a matrix. In the case scenario described above, the data is in columns already but I was wondering if there is a function which converts it into a string without the requirement of the data being in columns already. Please let me know. Thanks</description>
		<content:encoded><![CDATA[<p>Hi Doug, I have a question. I want to know a way to convert the string you obtain from using urlread() into a matrix. In the case scenario described above, the data is in columns already but I was wondering if there is a function which converts it into a string without the requirement of the data being in columns already. Please let me know. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1668</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Wed, 11 Nov 2009 19:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1668</guid>
		<description>Looks like this was answered in the newsgroup.
</description>
		<content:encoded><![CDATA[<p>Looks like this was answered in the newsgroup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1667</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Wed, 11 Nov 2009 15:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2009/03/03/read-data-from-the-web-with-urlread/#comment-1667</guid>
		<description>Hi Doug,

I tried to use you method to import data from the web, but it did not work. I did post a link on matlabcentral, http://www.mathworks.in/matlabcentral/newsreader/view_thread/265578, do you have any suggestion how I should read the data from the web and put it into a matrix?

-Magnus</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>I tried to use you method to import data from the web, but it did not work. I did post a link on matlabcentral, <a href="http://www.mathworks.in/matlabcentral/newsreader/view_thread/265578" rel="nofollow">http://www.mathworks.in/matlabcentral/newsreader/view_thread/265578</a>, do you have any suggestion how I should read the data from the web and put it into a matrix?</p>
<p>-Magnus</p>
]]></content:encoded>
	</item>
</channel>
</rss>

