Skip to content

Check for Octave Online from Script

You can use the following function to check if a script is running in Octave Online.  This can be helpful to write a script that needs to customize certain features for desktop Octave/Matlab that are not relevant for Octave Online, such as figure placement on the screen.
function [o] = is_octave_online()
% Returns true if the script is running in Octave Online.
o = !isempty(getenv("OO_SESSCODE"));
endfunction

Feedback and Knowledge Base