UbuntuHelp:Octave
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
GNU Octave is a high-level language, primarily intended for numerical computations. It is free software, and it is similar to the commercial product UbuntuHelp: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
Installation
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
octave
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:[email protected]:/cvsroot/gnuplot login cvs -z3 -d:pserver:[email protected]:/cvsroot/gnuplot co -P gnuplot
Configure:
cd gnuplot ./prepare ./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
Build:
make
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
Example:
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
.
Resources
- GNU Octave website
- GNU Octave Repository Add ons.
- Articles by Barry O'Donovan Some introductory articles.
- octave-gtk a GTK+ binding for GNU/Octave.
- Debian Octave Group