<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718</link>
    <title>MATLAB Central Newsreader - Check internet connection status using Matlab</title>
    <description>Feed for thread: Check internet connection status using Matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 17 Oct 2008 16:04:44 -0400</pubDate>
      <title>Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605918</link>
      <author>Jaime Zamora</author>
      <description>Hi All, is there a way to check if I'm connected to the internet using&lt;br&gt;
matlab?&lt;br&gt;
&lt;br&gt;
Best,&lt;br&gt;
Jaime</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 16:12:01 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605922</link>
      <author>Matt Fig</author>
      <description>doc web</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 16:15:17 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605925</link>
      <author>Jaime Zamora</author>
      <description>On Oct 17, 1:12=A0pm, &quot;Matt Fig&quot; &amp;lt;spama...@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; doc web&lt;br&gt;
&lt;br&gt;
I would like to write a function that returns true if it's connected&lt;br&gt;
to the internet.&lt;br&gt;
&lt;br&gt;
Best,&lt;br&gt;
Jaime</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 16:53:59 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605932</link>
      <author>Walter Roberson</author>
      <description>Jaime Zamora wrote:&lt;br&gt;
&amp;gt; is there a way to check if I'm connected to the internet using&lt;br&gt;
&amp;gt; matlab?&lt;br&gt;
&lt;br&gt;
Only if you add additional hardware to be able to verify a quantum-cryptography&lt;br&gt;
secured connection with a site you have *personally* installed the quantum&lt;br&gt;
cryptography hardware on.&lt;br&gt;
&lt;br&gt;
If you do anything less than quantum cryptography, then you will be unable&lt;br&gt;
to tell the difference between *really* being connected to the internet&lt;br&gt;
versus being connected to a private network that is lying and -telling- you&lt;br&gt;
are connected. Oh, sure you can have root certificates and &quot;web of trust&quot;&lt;br&gt;
PGP signed keys, but any of those can be broken with enough time and money&lt;br&gt;
(or bribery or covert operations to steal the keys).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Checking to see whether you are &quot;connected to the internet&quot; is, in practice,&lt;br&gt;
a singularly useless thing to do. Suppose you -are- connected to the &quot;internet&quot;&lt;br&gt;
and the check gives you an honest &quot;Yes&quot; answer. Now what??&lt;br&gt;
&lt;br&gt;
Being &quot;connected to&lt;br&gt;
the internet&quot; tells you absolutely nothing about whether you will be able to reach&lt;br&gt;
any particular service at any particular site. The site might be crashed; the site&lt;br&gt;
might be down for routine maintenance; there might be widespread power outages&lt;br&gt;
that took down the network somewhere between you and the site; a back-hole might&lt;br&gt;
have torn up the wires or fibers; a mouse or rabbit or ground-hog might have chewed&lt;br&gt;
apart an important connection on the way; there might be a bug in the network&lt;br&gt;
routing tables; someone might have deliberately &quot;poisoned&quot; the network routing tables;&lt;br&gt;
there might be a denial-of-service attack that is preventing you from reaching the&lt;br&gt;
places you want to go; there might be a bug in someone's firewall rules along the way;&lt;br&gt;
someone's firewall might be deliberately blocking you because you are not authorized&lt;br&gt;
to access the service; someone's firewall might be blocking you because you don't&lt;br&gt;
happen to know the right security codes to get through; your ISP might be blocking you&lt;br&gt;
because the government or a court order requires them to do so (think China, or think&lt;br&gt;
access to Nazi information from inside Germany to outside); your ISP might be&lt;br&gt;
blocking you because you have exceeded your account limits; your ISP might be blocking&lt;br&gt;
you because it is a meddling corporate entity concerned with profits and not with people.&lt;br&gt;
And so on.</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 19:52:03 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605972</link>
      <author>Scott Burnside</author>
      <description>Jaime Zamora &amp;lt;jaime.zamora@gmail.com&amp;gt; wrote in message &amp;lt;c562fa59-86ba-4fc0-98d3-dad9b19b5051@a70g2000hsh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On Oct 17, 1:12=A0pm, &quot;Matt Fig&quot; &amp;lt;spama...@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; doc web&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I would like to write a function that returns true if it's connected&lt;br&gt;
&amp;gt; to the internet.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Best,&lt;br&gt;
&amp;gt; Jaime&lt;br&gt;
&lt;br&gt;
Crude, but it works:&lt;br&gt;
&lt;br&gt;
function flag = isnet()&lt;br&gt;
% This function returns a 1 if basic internet connectivity&lt;br&gt;
% is present and returns a zero if no internet connectivity&lt;br&gt;
% is detected.&lt;br&gt;
&lt;br&gt;
% define the URL for US Naval Observatory Time page&lt;br&gt;
url =java.net.URL('&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;');&lt;br&gt;
&lt;br&gt;
% read the URL&lt;br&gt;
link = openStream(url);&lt;br&gt;
parse = java.io.InputStreamReader(link);&lt;br&gt;
snip = java.io.BufferedReader(parse);&lt;br&gt;
if ~isempty(snip)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flag = 1;&lt;br&gt;
else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flag = 0&lt;br&gt;
end&lt;br&gt;
return&lt;br&gt;
&lt;br&gt;
hth,&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 20:13:16 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605975</link>
      <author>Walter Roberson</author>
      <description>Scott Burnside wrote:&lt;br&gt;
&amp;gt; Jaime Zamora &amp;lt;jaime.zamora@gmail.com&amp;gt; wrote in message &amp;lt;c562fa59-86ba-4fc0-98d3-dad9b19b5051@a70g2000hsh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; On Oct 17, 1:12=A0pm, &quot;Matt Fig&quot; &amp;lt;spama...@yahoo.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; I would like to write a function that returns true if it's connected&lt;br&gt;
&amp;gt;&amp;gt; to the internet.&lt;br&gt;
&lt;br&gt;
&amp;gt; Crude, but it works:&lt;br&gt;
&lt;br&gt;
&amp;gt; % This function returns a 1 if basic internet connectivity&lt;br&gt;
&amp;gt; % is present and returns a zero if no internet connectivity&lt;br&gt;
&amp;gt; % is detected.&lt;br&gt;
&lt;br&gt;
&amp;gt; % define the URL for US Naval Observatory Time page&lt;br&gt;
&amp;gt; url =java.net.URL('&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;');&lt;br&gt;
&lt;br&gt;
And if I am the DNS administrator for your network, and I define&lt;br&gt;
tycho.usno.navy.mil to resolve to one of the local machines, then&lt;br&gt;
although you might detect that a connection was made, it would&lt;br&gt;
not be an *internet* connection that had been detected.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
You also didn't meet the specifications. The specification was not&lt;br&gt;
whether &quot;internet connectivity is detected&quot;, the specification&lt;br&gt;
was whether it is &quot;connected to the internet&quot;. For example if I were&lt;br&gt;
the firewall administrator for your network and I had blocked all outgoing&lt;br&gt;
http except to certain specific sites (e.g., allowed access to headquarter's&lt;br&gt;
press releases but other sites permitted only upon -proof- that access&lt;br&gt;
was required for your work), then because you would be &quot;connected to&lt;br&gt;
the internet&quot;, the function would be required to return true, even though&lt;br&gt;
the function cannot contact USNO.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Sites *do* get blocked. Blocking many sites is a corporate legal requirement for&lt;br&gt;
many companies -- for example, in many companies, blocking access to any&lt;br&gt;
kind of nudity or sexuality is required, with the requirement sometimes imposed&lt;br&gt;
by law (e.g., many US libraries are -required- to prevent minors from accessing&lt;br&gt;
adult sites.) And then there are the legal requirements under &lt;br&gt;
Sarbanes-Oxley, which can require companies to block access to competitors&lt;br&gt;
as elements of proof that they are not in collusion with the competitors...</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 20:21:02 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605977</link>
      <author>Scott Burnside</author>
      <description>Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;kl6Kk.1126$YN3.855@newsfe12.iad&amp;gt;...&lt;br&gt;
&amp;gt; Scott Burnside wrote:&lt;br&gt;
&amp;gt; &amp;gt; Jaime Zamora &amp;lt;jaime.zamora@gmail.com&amp;gt; wrote in message &amp;lt;c562fa59-86ba-4fc0-98d3-dad9b19b5051@a70g2000hsh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; On Oct 17, 1:12=A0pm, &quot;Matt Fig&quot; &amp;lt;spama...@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; I would like to write a function that returns true if it's connected&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; to the internet.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Crude, but it works:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % This function returns a 1 if basic internet connectivity&lt;br&gt;
&amp;gt; &amp;gt; % is present and returns a zero if no internet connectivity&lt;br&gt;
&amp;gt; &amp;gt; % is detected.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % define the URL for US Naval Observatory Time page&lt;br&gt;
&amp;gt; &amp;gt; url =java.net.URL('&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; And if I am the DNS administrator for your network, and I define&lt;br&gt;
&amp;gt; tycho.usno.navy.mil to resolve to one of the local machines, then&lt;br&gt;
&amp;gt; although you might detect that a connection was made, it would&lt;br&gt;
&amp;gt; not be an *internet* connection that had been detected.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You also didn't meet the specifications. The specification was not&lt;br&gt;
&amp;gt; whether &quot;internet connectivity is detected&quot;, the specification&lt;br&gt;
&amp;gt; was whether it is &quot;connected to the internet&quot;. For example if I were&lt;br&gt;
&amp;gt; the firewall administrator for your network and I had blocked all outgoing&lt;br&gt;
&amp;gt; http except to certain specific sites (e.g., allowed access to headquarter's&lt;br&gt;
&amp;gt; press releases but other sites permitted only upon -proof- that access&lt;br&gt;
&amp;gt; was required for your work), then because you would be &quot;connected to&lt;br&gt;
&amp;gt; the internet&quot;, the function would be required to return true, even though&lt;br&gt;
&amp;gt; the function cannot contact USNO.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Sites *do* get blocked. Blocking many sites is a corporate legal requirement for&lt;br&gt;
&amp;gt; many companies -- for example, in many companies, blocking access to any&lt;br&gt;
&amp;gt; kind of nudity or sexuality is required, with the requirement sometimes imposed&lt;br&gt;
&amp;gt; by law (e.g., many US libraries are -required- to prevent minors from accessing&lt;br&gt;
&amp;gt; adult sites.) And then there are the legal requirements under &lt;br&gt;
&amp;gt; Sarbanes-Oxley, which can require companies to block access to competitors&lt;br&gt;
&amp;gt; as elements of proof that they are not in collusion with the competitors...&lt;br&gt;
&lt;br&gt;
Understood Walter. All your caveats are valid.&lt;br&gt;
&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Fri, 17 Oct 2008 23:21:01 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#605986</link>
      <author>Scott Burnside</author>
      <description>&quot;Scott Burnside&quot; &amp;lt;no@spam.com&amp;gt; wrote in message &amp;lt;gdaqd3$lt0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Jaime Zamora &amp;lt;jaime.zamora@gmail.com&amp;gt; wrote in message &amp;lt;c562fa59-86ba-4fc0-98d3-dad9b19b5051@a70g2000hsh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; On Oct 17, 1:12=A0pm, &quot;Matt Fig&quot; &amp;lt;spama...@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; doc web&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I would like to write a function that returns true if it's connected&lt;br&gt;
&amp;gt; &amp;gt; to the internet.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Best,&lt;br&gt;
&amp;gt; &amp;gt; Jaime&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Crude, but it works:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; function flag = isnet()&lt;br&gt;
&amp;gt; % This function returns a 1 if basic internet connectivity&lt;br&gt;
&amp;gt; % is present and returns a zero if no internet connectivity&lt;br&gt;
&amp;gt; % is detected.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % define the URL for US Naval Observatory Time page&lt;br&gt;
&amp;gt; url =java.net.URL('&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % read the URL&lt;br&gt;
&amp;gt; link = openStream(url);&lt;br&gt;
&amp;gt; parse = java.io.InputStreamReader(link);&lt;br&gt;
&amp;gt; snip = java.io.BufferedReader(parse);&lt;br&gt;
&amp;gt; if ~isempty(snip)&lt;br&gt;
&amp;gt;     flag = 1;&lt;br&gt;
&amp;gt; else&lt;br&gt;
&amp;gt;     flag = 0&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; return&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; hth,&lt;br&gt;
&amp;gt; Scott&lt;br&gt;
&lt;br&gt;
Hmmm. Needs a try/catch:&lt;br&gt;
&lt;br&gt;
function flag = isnet()&lt;br&gt;
% This function returns a 1 if basic internet connectivity&lt;br&gt;
% is present and returns a zero if no internet connectivity&lt;br&gt;
% is detected.&lt;br&gt;
&lt;br&gt;
% define the URL for US Naval Observatory Time page&lt;br&gt;
url =java.net.URL('&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;');&lt;br&gt;
&lt;br&gt;
% read the URL&lt;br&gt;
try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;link = openStream(url);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parse = java.io.InputStreamReader(link);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;snip = java.io.BufferedReader(parse);&lt;br&gt;
catch&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flag = 0;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;br&gt;
end&lt;br&gt;
if ~isempty(snip)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flag = 1;&lt;br&gt;
else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flag = 0;&lt;br&gt;
end&lt;br&gt;
return&lt;br&gt;
% end of code&lt;br&gt;
&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Sat, 18 Oct 2008 13:48:01 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606037</link>
      <author>Jan Simon</author>
      <description>Dear Walter Roberson!&lt;br&gt;
&lt;br&gt;
&amp;gt; Checking to see whether you are &quot;connected to the &lt;br&gt;
&amp;gt; internet&quot; is, in practice, a singularly useless&lt;br&gt;
&amp;gt; thing to do.&lt;br&gt;
&lt;br&gt;
Perhaps it is enough for Jaime Zamora to check, if he is not disconnected. E.g. for a task like &quot;start the mail program only, if it looks, like the machine has contact&quot;.&lt;br&gt;
&lt;br&gt;
Of course, a super-user can pretend an internet connection ever. We are all aware, that the impression of reading the Matlab Newsreader pages could be the result of a smartish virus working on out local host feeding the browser with faked messages. My complete mail correspondence of the last year could be a virtual product of tricky malware. &lt;br&gt;
&lt;br&gt;
Nevertheless, why stopping at this trivial point? Sensory perception of even humans could be remote controlled at all.&lt;br&gt;
&lt;br&gt;
Plato's parable of the cave had less special effect than The Matrix. However, both describe the problems of intelligent life forms and Matlab: There is no way to answer the question, if any input is &quot;real&quot;. There are no red and blue pills.&lt;br&gt;
&lt;br&gt;
How to proceed with programing/living than?&lt;br&gt;
In my personal opinion, Jaime Zamora can ask his imperfect question (is the machine connected?) and &quot;believe&quot; the found answer with respect to the potential limits. So if his internet connection is a good fake, it is as good as a &quot;real&quot; connection!&lt;br&gt;
&lt;br&gt;
Kind regards, Jan</description>
    </item>
    <item>
      <pubDate>Sun, 19 Oct 2008 03:03:18 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606088</link>
      <author>Walter Roberson</author>
      <description>Jan Simon wrote:&lt;br&gt;
&amp;gt; Dear Walter Roberson!&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Checking to see whether you are &quot;connected to the &lt;br&gt;
&amp;gt;&amp;gt; internet&quot; is, in practice, a singularly useless&lt;br&gt;
&amp;gt;&amp;gt; thing to do.&lt;br&gt;
&lt;br&gt;
&amp;gt; Perhaps it is enough for Jaime Zamora to check, if he is not disconnected. E.g. for&lt;br&gt;
&amp;gt; a task like &quot;start the mail program only, if it looks, like the machine has contact&quot;.&lt;br&gt;
&lt;br&gt;
In Canada and the USA, it is standard practice for residential ISPs to block&lt;br&gt;
outgoing access to all mail servers except the ISP's own mail server. This blocks&lt;br&gt;
PCs infected with viruses or trojan horses from being able to run mass spam&lt;br&gt;
or virus-sending attacks on systems in the rest of the world. You might be&lt;br&gt;
&quot;connected to the internet&quot; and yet not be able to reach your mail server&lt;br&gt;
of choice (and most of the ISPs did not bother to notify customers before&lt;br&gt;
they started doing this kind of blocking.)&lt;br&gt;
&lt;br&gt;
As I said before, checking whether you are &quot;connected to the internet&quot; is,&lt;br&gt;
in practice, a singularly useless thing to do. If you have a specific&lt;br&gt;
activity you want to undertake, then check to see whether you can do *that*,&lt;br&gt;
not whether you are &quot;connected to the internet&quot;. If you want to know&lt;br&gt;
whether your PPPoE client is loaded and talking to your ADSL modem,&lt;br&gt;
then check -that-.</description>
    </item>
    <item>
      <pubDate>Sun, 19 Oct 2008 10:52:01 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606128</link>
      <author>Jan Simon</author>
      <description>Dear Walter Roberson!&lt;br&gt;
&lt;br&gt;
&amp;gt; If you have a specific activity you want to undertake, then&lt;br&gt;
&amp;gt; check to see whether you can do *that*,&lt;br&gt;
&amp;gt; not whether you are &quot;connected to the internet&quot;. If you &lt;br&gt;
&amp;gt; want to know whether your PPPoE client is loaded and &lt;br&gt;
&amp;gt; talking to your ADSL modem, then check -that-.&lt;br&gt;
&lt;br&gt;
Exactly.&lt;br&gt;
&lt;br&gt;
The question was (analogous): **How** do I check the availability of a certain internet service in Matlab?&lt;br&gt;
We cannot clear the question **what** Jaime Zamora wants to do.&lt;br&gt;
&lt;br&gt;
Quantum-cryptography would not help for this reason, usually. &lt;br&gt;
&lt;br&gt;
Considering evil DNS administrators would not help, either.&lt;br&gt;
&lt;br&gt;
Theories about human perception would not help, either (I have to admit).&lt;br&gt;
&lt;br&gt;
&quot;java.net.URL&quot; recommended by Scott can help (but not under 100% of all imaginable and not-imaginable situations).&lt;br&gt;
&lt;br&gt;
&quot;URLREAD&quot; might help also (but not under 100%...).&lt;br&gt;
&lt;br&gt;
Good luck, Jan</description>
    </item>
    <item>
      <pubDate>Sun, 19 Oct 2008 19:09:02 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606172</link>
      <author>Scott Burnside</author>
      <description>&quot;Jan Simon&quot; &amp;lt;matlab.THIS_YEAR@nMINUSsimon.de&amp;gt; wrote in message &amp;lt;gdf3gh$m5u$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Dear Walter Roberson!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If you have a specific activity you want to undertake, then&lt;br&gt;
&amp;gt; &amp;gt; check to see whether you can do *that*,&lt;br&gt;
&amp;gt; &amp;gt; not whether you are &quot;connected to the internet&quot;. If you &lt;br&gt;
&amp;gt; &amp;gt; want to know whether your PPPoE client is loaded and &lt;br&gt;
&amp;gt; &amp;gt; talking to your ADSL modem, then check -that-.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Exactly.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The question was (analogous): **How** do I check the availability of a certain internet service in Matlab?&lt;br&gt;
&amp;gt; We cannot clear the question **what** Jaime Zamora wants to do.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Quantum-cryptography would not help for this reason, usually. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Considering evil DNS administrators would not help, either.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Theories about human perception would not help, either (I have to admit).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;java.net.URL&quot; recommended by Scott can help (but not under 100% of all imaginable and not-imaginable situations).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;URLREAD&quot; might help also (but not under 100%...).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Good luck, Jan&lt;br&gt;
&lt;br&gt;
I agree with Walter in that I think a purpose-built remote entity who responded to strongly encrypted interrogations with strongly encrypted replies would be as close as you could get but certainly not 100%. &lt;br&gt;
&lt;br&gt;
Scott </description>
    </item>
    <item>
      <pubDate>Sun, 19 Oct 2008 22:55:02 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606202</link>
      <author>Walter Roberson</author>
      <description>Scott Burnside wrote:&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;gt; I agree with Walter in that I think a purpose-built remote entity who responded to strongly&lt;br&gt;
&amp;gt; encrypted interrogations with strongly encrypted replies would be as close as you&lt;br&gt;
&amp;gt; could get but certainly not 100%. &lt;br&gt;
&lt;br&gt;
That's why I mentioned quantum cryptography. With regular cryptography, you could have&lt;br&gt;
a &quot;man in the middle&quot;, if the &quot;man in the middle&quot; could solve the cryptographic&lt;br&gt;
challenges sufficiently quickly -- something which cannot be done on any publicly&lt;br&gt;
known system, but which is theoretically vulnerable to &quot;quantum computing&quot;&lt;br&gt;
(all solutions theoretically calculated simultaneously), and which might plausibly&lt;br&gt;
be within reach with publicly known technology based upon &quot;biological computing&quot;&lt;br&gt;
(extreme mass parallelism at low price and low heat.) Is there any NSA, or&lt;br&gt;
Mossad, or Men in Black covert system that can handle sufficiently strong&lt;br&gt;
&quot;man in the middle&quot; challenges in real time? The answer to that is either &quot;NO&quot;&lt;br&gt;
or &quot;Walter Roberson is not authorized to even hear rumours of such a system&lt;br&gt;
really existing&quot;, but &quot;Absence of evidence is not evidence of absence&quot;.&lt;br&gt;
&lt;br&gt;
But with quantum cryptography, &quot;man in the middle&quot; attacks are not *possible*&lt;br&gt;
according to all current quantum physics: all experimentation so far indicates&lt;br&gt;
that any attempt to &quot;snoop&quot; on quantum-entangled particle pairs would de-tangle&lt;br&gt;
the particles, with the effect of randomizing the content of the transmitted&lt;br&gt;
message. No possible &quot;man in the middle&quot; attack, because what is transferred&lt;br&gt;
in quantum cryptography is not mere &quot;information&quot; that could be replicated.</description>
    </item>
    <item>
      <pubDate>Mon, 20 Oct 2008 18:43:02 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606417</link>
      <author>Matthew Simoneau</author>
      <description>Scott, I think we can simplify your code by using URLREAD:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
function flag = isnet()&lt;br&gt;
% This function returns a 1 if basic internet connectivity&lt;br&gt;
% is present and returns a zero if no internet connectivity&lt;br&gt;
% is detected.&lt;br&gt;
&lt;br&gt;
% define the URL for US Naval Observatory Time page&lt;br&gt;
url = '&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;';&lt;br&gt;
&lt;br&gt;
% Try to connect to it.&lt;br&gt;
[unused,flag] = urlread(url);</description>
    </item>
    <item>
      <pubDate>Mon, 20 Oct 2008 21:56:03 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#606473</link>
      <author>Scott Burnside</author>
      <description>&quot;Matthew Simoneau&quot; &amp;lt;matthew@mathworks.com&amp;gt; wrote in message &amp;lt;gdijfm$jk9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Scott, I think we can simplify your code by using URLREAD:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; function flag = isnet()&lt;br&gt;
&amp;gt; % This function returns a 1 if basic internet connectivity&lt;br&gt;
&amp;gt; % is present and returns a zero if no internet connectivity&lt;br&gt;
&amp;gt; % is detected.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % define the URL for US Naval Observatory Time page&lt;br&gt;
&amp;gt; url = '&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;';&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % Try to connect to it.&lt;br&gt;
&amp;gt; [unused,flag] = urlread(url);&lt;br&gt;
&lt;br&gt;
Nice. Man that is compact. &lt;br&gt;
&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Sat, 06 Feb 2010 22:10:22 -0500</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#714668</link>
      <author>jason</author>
      <description>&quot;Scott Burnside&quot; &amp;lt;no@spam.com&amp;gt; wrote in message &amp;lt;gdiupj$l2q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Matthew Simoneau&quot; &amp;lt;matthew@mathworks.com&amp;gt; wrote in message &amp;lt;gdijfm$jk9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Scott, I think we can simplify your code by using URLREAD:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; function flag = isnet()&lt;br&gt;
&amp;gt; &amp;gt; % This function returns a 1 if basic internet connectivity&lt;br&gt;
&amp;gt; &amp;gt; % is present and returns a zero if no internet connectivity&lt;br&gt;
&amp;gt; &amp;gt; % is detected.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % define the URL for US Naval Observatory Time page&lt;br&gt;
&amp;gt; &amp;gt; url = '&lt;a href=&quot;http://tycho.usno.navy.mil/cgi-bin/timer.pl&quot;&gt;http://tycho.usno.navy.mil/cgi-bin/timer.pl&lt;/a&gt;';&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % Try to connect to it.&lt;br&gt;
&amp;gt; &amp;gt; [unused,flag] = urlread(url);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Nice. Man that is compact. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Scott&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
similar response:&lt;br&gt;
&lt;br&gt;
urlread('&lt;a href=&quot;http://www.google.com&quot;&gt;http://www.google.com&lt;/a&gt;')&lt;br&gt;
??? Error using ==&amp;gt; urlread at 108&lt;br&gt;
Error downloading URL.&lt;br&gt;
&lt;br&gt;
if you use urlread and do a try catch type command you will get your function.&lt;br&gt;
&lt;br&gt;
this returns html if it gets the site. the above error is if i turn my wireless connection off.</description>
    </item>
    <item>
      <pubDate>Tue, 17 Aug 2010 00:41:25 -0400</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#771967</link>
      <author>Kyle </author>
      <description>Jason,&lt;br&gt;
&amp;nbsp;a helpful tip:&lt;br&gt;
When calling a function with output dependent on nargout:&lt;br&gt;
ex.)  minimum = min(x) vs. [minimum,index] = min(x),&lt;br&gt;
you can use&lt;br&gt;
[~,index] = min(x).&lt;br&gt;
to ignore the first output arg, while the function sees nargin==2.&lt;br&gt;
it speeds things up a little.  &lt;br&gt;
I also helps clear up clutter </description>
    </item>
    <item>
      <pubDate>Thu, 16 Dec 2010 11:37:05 -0500</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#805313</link>
      <author>Richard Crozier</author>
      <description>&quot;Kyle &quot; &amp;lt;kyle.drerup@gmail.com&amp;gt; wrote in message &amp;lt;i4clrl$1ip$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Jason,&lt;br&gt;
&amp;gt;  a helpful tip:&lt;br&gt;
&amp;gt; When calling a function with output dependent on nargout:&lt;br&gt;
&amp;gt; ex.)  minimum = min(x) vs. [minimum,index] = min(x),&lt;br&gt;
&amp;gt; you can use&lt;br&gt;
&amp;gt; [~,index] = min(x).&lt;br&gt;
&amp;gt; to ignore the first output arg, while the function sees nargin==2.&lt;br&gt;
&amp;gt; it speeds things up a little.  &lt;br&gt;
&amp;gt; I also helps clear up clutter &lt;br&gt;
&lt;br&gt;
Amazing what you learn while reading the newreader, now I know how to check the internet connection, and this amazing tip I'd never heard of before! I've often wished I could ignore some unnecessary arguments but thought it was impossible.</description>
    </item>
    <item>
      <pubDate>Thu, 16 Dec 2010 12:35:21 -0500</pubDate>
      <title>Re: Check internet connection status using Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237718#805329</link>
      <author>Geant Bepi</author>
      <description>&quot;Richard Crozier&quot; &amp;lt;r.crozier@ed.ac.uk&amp;gt; wrote in message &amp;lt;iectl1$crh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Kyle &quot; &amp;lt;kyle.drerup@gmail.com&amp;gt; wrote in message &amp;lt;i4clrl$1ip$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Jason,&lt;br&gt;
&amp;gt; &amp;gt;  a helpful tip:&lt;br&gt;
&amp;gt; &amp;gt; When calling a function with output dependent on nargout:&lt;br&gt;
&amp;gt; &amp;gt; ex.)  minimum = min(x) vs. [minimum,index] = min(x),&lt;br&gt;
&amp;gt; &amp;gt; you can use&lt;br&gt;
&amp;gt; &amp;gt; [~,index] = min(x).&lt;br&gt;
&amp;gt; &amp;gt; to ignore the first output arg, while the function sees nargin==2.&lt;br&gt;
&amp;gt; &amp;gt; it speeds things up a little.  &lt;br&gt;
&amp;gt; &amp;gt; I also helps clear up clutter &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Amazing what you learn while reading the newreader, now I know how to check the internet connection, and this amazing tip I'd never heard of before! I've often wished I could ignore some unnecessary arguments but thought it was impossible.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
It was edifying to read all your responses..It is amazing what you can do with Matlab :)&lt;br&gt;
&lt;br&gt;
I invite the brains here to look at my simple problem mentioned below and help me with some tips;&lt;br&gt;
link: &lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/297252#804997&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/297252#804997&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
thanks heaps!</description>
    </item>
  </channel>
</rss>

