forked from CERN/TIGRE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaveInet.m
26 lines (26 loc) · 1.02 KB
/
haveInet.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function tf = haveInet()
%HAVEINET returns true if the owner has internet or false if it hasent
% Taken from
% https://stackoverflow.com/questions/19557118/internet-connection-status-using-matlab
%--------------------------------------------------------------------------
%--------------------------------------------------------------------------
% This file is part of the TIGRE Toolbox
%
% Copyright (c) 2015, University of Bath and
% CERN-European Organization for Nuclear Research
% All rights reserved.
%
% License: Open Source under BSD.
% See the full license at
% https://github.com/CERN/TIGRE/license.txt
%
% Contact: [email protected]
% Codes: https://github.com/CERN/TIGRE/
% Coded by: Ander Biguri
%--------------------------------------------------------------------------
tf = false;
try
java.net.InetAddress.getByName('www.google.com');
tf = true;
end
end