Possible Duplicate:
How do I detect if Iām running MATLAB or Octave?
My code was designed using MATLAB and I still use it. However, if I try to run some parts of it using Octave, I get errors. For example, MATLAB code uses pause on
which Octave doesn't.
Is there a way to check which programming environment is using the code? For example,
if invoking_env == 'Matlab'
% do this
else
% ok, so do this
end
I can use getenv('COMPUTERNAME')
but in this case the computer name is the same! Thanks.