We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57e42e6 commit d17fa71Copy full SHA for d17fa71
+stdlib/is_matlab_online.m
@@ -0,0 +1,19 @@
1
+%% IS_MATLAB_ONLINE check if running in MATLAB Online
2
+% This function is heuristic check using undocumented environment variables.
3
+% These variables have worked across several Matlab releases, but there isn't a guarantee
4
+% that they will always be present or have the same values.
5
+
6
+function y = is_matlab_online()
7
8
+y = isunix() && ~ismac();
9
+if ~y, return, end
10
11
+h = getenv("MW_DDUX_APP_NAME");
12
13
+if h == "MATLAB_ONLINE"
14
+ y = true;
15
+else
16
+ y = false;
17
+end
18
19
0 commit comments