Is this MATLAB or Octave?

Version 1.0.0.0 (509 octets) par ioxv.4623
Crude but effective tests of whether code is executed in matlab or octave.
734 téléchargements
Mise à jour 23 avr. 2009

Afficher la licence

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

Citation pour cette source

ioxv.4623 (2024). Is this MATLAB or Octave? (https://www.mathworks.com/matlabcentral/fileexchange/23868-is-this-matlab-or-octave), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2007b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Octave dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0