|
Article ID: 535
Last updated: 13 Jan, 2019
GNU Octave is an open-source program that you can use as an alternative to MATLAB. Its basic numerical functions are very similar to MATLAB, in terms of appearance and usage. Also, because the Octave language is similar to MATLAB, most MATLAB programs should be able to run on Octave. However, Octave toolboxes are different from MATLAB toolboxes. If you rely on any of the MATLAB toolboxes, you may not want to switch to Octave (or, you can make an appropriate modification). For detailed information about Octave, see the GNU Octave home page. For a comparison of the two programs, see Differences Between Octave and MATLAB on the GNU Octave wiki page. Using OctaveThe latest version of Octave, Version 4.0.0, includes a graphical user interface (GUI). All of the previous versions run only with a command-line interface. To see a list of versions available on NAS systems, run:
To check the version you are using:
To access a quick help guide:
If you are using Octave Version 4.0.0 but you do not want to use the GUI, add the --no-gui option:
For comprehensive instructions on using Octave, see the GNU Octave documentation. DemonstrationOctave's "look and feel" is similar to MATLAB. To see a demonstration, run:
A waterfall plot is displayed. Note: The Octave demonstration feature is not as powerful as that of MATLAB, but it shows you the similarities between the two programs. ExampleOctave supports the same basic matrix operations and plotting as MATLAB. For example, if you run the following MATLAB code in Octave, the result will provide the same graphics as MATLAB. MATLAB code:
Result in Octave:
Note: If there is a function in your MATLAB code that has not been implemented in Octave, a message will be displayed. For example:
Also read
|
