Is this MATLAB or Octave?
by ioxv.4623
23 Apr 2009
Crude but effective tests of whether code is executed in matlab or octave.
|
Watch this File
|
| File Information |
| Description |
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 |
| MATLAB release |
MATLAB 7.5 (R2007b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us at files@mathworks.com