You could use the following test to differentiate Octave from MATLAB:

```
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
```

### Related Contents:

- For loop to split matrix to equal sized sub-matrices
- “Undefined function ‘function_name’ for input arguments of type ‘double’.”
- How can I plot a function with two variables in Octave or Matlab?
- Getting FFT peaks from data
- Create a zero-filled 2D array with ones at positions indexed by a vector
- Octave / Matlab: Extend a vector making it repeat itself?
- How can I sort a 2-D array in MATLAB with respect to one column?
- Octave/Matlab: Adding new elements to a vector
- How can I index a MATLAB array returned by a function without first assigning it to a local variable?
- Random numbers that add to 100: Matlab
- Generate all possible combinations of the elements of some vectors (Cartesian product)
- Generate random number with given probability matlab
- Matrix of unknown length in MATLAB?
- How to generate all pairs from two vectors in MATLAB using vectorised code?
- Finding K-nearest neighbors and its implementation
- Approaches to create a video in matlab
- How do I visualize a matrix with colors and values displayed?
- How should I update the data of a plot in Matlab?
- Find given row in a matrix
- Analytical Fourier transform vs FFT of functions in Matlab
- What’s the difference between & and && in MATLAB?
- How do I access structure fields dynamically?
- Index of max and min value in an array
- Plot a plane based on a normal vector and a point in Matlab or matplotlib
- How do I set default values for functions parameters in MATLAB?
- Fastest Matlab file reading?
- Suppress Output
- Suppressing a function’s command window output
- Get the indices of the n largest elements in a matrix
- Why is reshape so fast? (Spoiler: Copy-on-Write)
- Fortran minimization of a function with additional arguments
- How do properties work in Object Oriented MATLAB?
- How do I get real integer overflows in MATLAB/Octave?
- Align already captured rgb and depth images
- How to deal with overflow and underflow?
- What are the best practices for floating-point comparisons in Matlab?
- What are the semantics of ‘end’ in Matlab?
- How can I program a GUI in MATLAB? [closed]
- Setting graph figure size
- Passing functions as arguments in Matlab
- Sorting entire matrix according to one column in matlab
- quiver3 arrow color corresponding to magnitude
- PCA in matlab selecting top n components
- Matlab: repeat every column sequentially n times [duplicate]
- How to plot a circle in Matlab?
- Matlab file name with zero-padded numbers
- How can I change the color of bars in bar graph?
- How do I get the handles of all open figures in MATLAB
- MATLAB Compiler vs MATLAB Coder
- Automatically maximize a figure