Needs Expansion
This article is incomplete, and needs to be expanded. More info...

GNU Octave is a high-level language, primarily intended for numerical computations. It is free software, and it is similar to the commercial product MATLAB. It gives you an command line environment where you can do calculation, solve equations, manipulate matrices and plot graphs. A list of commands can be put into a file and executed as an interpreted scripting language.

A simple example of a Octave session

octave:1> a = 2 * 3
a = 6
octave:2> b = [ 1 2 3 4]
b =

  1  2  3  4

octave:3> c = a * b
c =

   6  12  18  24

octave:4> exit


Octave is in the Ubuntu universe and can be installed with synaptic or apt-get. The package name is "octave"

Running octave

To run octave open a terminal and type


Zooming in GNUPlot

The latest GNUPlot from CVS (2008-10-09 is what I used) can zoom with the mouse. For certain tasks, this is obviously a huge improvement over using xlim() and ylim(). These instructions are for 8.04; hopefully it will make it into the 8.10 or 9.04 repos.

Build GNUPlot with the instructions at http://www.gnuplot.info/development/index.html. You will need at least these packages (please add to this list if you see the need for more):

sudo aptitude install build-essential cvs autoconf automake libgd2-xpm-dev checkinstall xorg-dev

Run the cvs commands from gnuplot.info's instructions:

 cvs -d:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot login
 cvs -z3 -d:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot co -P gnuplot


 cd gnuplot
 ./configure --prefix=/usr/local/

The output of configure will tell you if you have the correct things enabled in gnuplot. Look for the following lines:

 X Window System terminal: yes
 jpeg terminal: yes
 gif terminal: yes
 png terminal: yes
 Mouse support in interactive terminals: yes
 Zooming or refresh of volatile data: yes



Install. checkinstall is a program to automatically make a debian package, so it is easy to uninstall or install on similar systems. checkinstall will complain loudly about a bad version number. Make the version something like 4.3-cvs. Debian package versions must have numbers in them.

 sudo checkinstall


Package: gnuplot
Status: install ok installed
Priority: extra
Section: checkinstall
Installed-Size: 7036
Maintainer: root@localhost
Architecture: amd64
Version: 4.3-cvs-1
Description: Gnuplot

Alternatively, you can just sudo make install.


CategoryProgramming CategoryScience CategorySoftware

Octave (last edited 2009-07-30 02:10:04 by nr5-216-196-212-199)