I need to write code that should run equally well in Octave and on MATLAB. Problem is that it needs to do some GUI stuff, which MATLAB and Octave handle completely differently.
Is there a way I can detect if I'm running MATLAB or Octave, in order to call the right function?
MATLAB is a matrix laboratory, referred to as language used for technical computations. Octave is programming language used for numerical computations.
Octave is mostly compatible with Matlab. Most matlab functions can be made to run with very little change. With careful coding, you can get your code to run without change in Matlab and Octave.
Well, it has been seen that Matlab is more powerful as compared to Octave. Moreover, Matlab's algorithms are much faster than Octave's algorithms.
You could use the following test to differentiate Octave from MATLAB:
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With