You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
UIMATLAB returns true if the function is called from matlab, and false otherwise.
UIOCTAVE returns true if the function is called from octave, and false otherwise.
Using these functions, one is able to execute different parts of the code depending on what engine is performing the operations. Compatibility issues between MATLAB and Octave can thus be avoided.
For example:
if uimatlab
disp('This is MATLAB.')
elseif uioctave
disp('This is Octave.')
else
disp('I do not know what user environment this is.')
end
Cite As
ioxv.4623 (2026). Is this MATLAB or Octave? (https://www.mathworks.com/matlabcentral/fileexchange/23868-is-this-matlab-or-octave), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (509 Bytes)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
