Skip to content

Commit 4afd3a2

Browse files
committed
simplify
1 parent 62b1768 commit 4afd3a2

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

+stdlib/is_matlab_online.m

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55

66
function y = is_matlab_online()
77

8-
y = isunix() && ~ismac();
9-
if ~y, return, end
8+
name = "MW_DDUX_APP_NAME";
9+
value = "MATLAB_ONLINE";
1010

11-
h = getenv("MW_DDUX_APP_NAME");
12-
13-
if h == "MATLAB_ONLINE"
14-
y = true;
15-
else
16-
y = false;
17-
end
11+
y = isunix() && ~ismac() && contains(getenv(name), value);
1812

1913
end

0 commit comments

Comments
 (0)