Friday, June 28, 2013

GNU Octave as an Alternative to MatLab

GNU Octave, FreeMat and Scilab are free open source software for numerical calculations alternative to MATLAB. After reading reviews in the Internet, I chose GNU Octave to try. Installing GNU Octave on a Windows system is easy. Download the files from its Download page and extract them to a folder. Then, you can put the shortcut at a desired location and change the path and the icon in its properties. When you open GNU Octave by clicking the shortcut, a window will appear as shown in the following figure. You can key in MATLAB commands there directly.

You can also write a MATLAB file with .m extension and use it. Use 'chdir' command to change the path and enter the file name with a semicolon at the end. To exit Octave, you can enter 'exit' or 'quit'.
I used macports to install octave on OS X using the command- "sudo port install octave +gcc48". Package such as control package can be installed by entering the command "pkg install -forge control" in the octave command windows. For Ubuntu, the following commands can be used.
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
I have also tried FreeMat. User interface looks better and easier than Octave. But some MATLAB commands are not compatible to FreeMat.

No comments:

Post a Comment

Comments are moderated and don't be surprised if your comment does not appear promptly.