个人工具

“UbuntuHelp:Octave”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的4个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Octave}}
 
{{From|https://help.ubuntu.com/community/Octave}}
 
{{Languages|UbuntuHelp:Octave}}
 
{{Languages|UbuntuHelp:Octave}}
[http://www.octave.org/ GNU Octave] is a high-level language, primarily intended for numerical computations. It is similar to the commerial product [http://www.mathworks.com/ 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.
+
<<Include(Tag/NeedsExpansion)>>
 +
[http://www.octave.org/ 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|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
 
A simple example of a Octave session
 
<pre><nowiki>
 
<pre><nowiki>
第8行: 第9行:
 
octave:2> b = [ 1 2 3 4]
 
octave:2> b = [ 1 2 3 4]
 
b =
 
b =
1  2  3  4
+
 
 +
  1  2  3  4
 +
 
 
octave:3> c = a * b
 
octave:3> c = a * b
 
c =
 
c =
6  12  18  24
+
 
 +
  6  12  18  24
 +
 
 
octave:4> exit
 
octave:4> exit
 
</nowiki></pre>
 
</nowiki></pre>
第21行: 第26行:
 
octave
 
octave
 
</nowiki></pre>
 
</nowiki></pre>
 +
=== 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 <code><nowiki>xlim()</nowiki></code> and <code><nowiki>ylim()</nowiki></code>.  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)'':
 +
<pre><nowiki>
 +
sudo aptitude install build-essential cvs autoconf automake libgd2-xpm-dev checkinstall xorg-dev
 +
</nowiki></pre>
 +
Run the cvs commands from gnuplot.info's instructions:
 +
<pre><nowiki>
 +
cvs -d:pserver:[email protected]:/cvsroot/gnuplot login
 +
cvs -z3 -d:pserver:[email protected]:/cvsroot/gnuplot co -P gnuplot
 +
</nowiki></pre>
 +
Configure:
 +
<pre><nowiki>
 +
cd gnuplot
 +
./prepare
 +
./configure --prefix=/usr/local/
 +
</nowiki></pre>
 +
The output of configure will tell you if you have the correct things enabled in gnuplot.  Look for the following lines:
 +
<pre><nowiki>
 +
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
 +
</nowiki></pre>
 +
Build:
 +
<pre><nowiki>
 +
make
 +
</nowiki></pre>
 +
Install.  <code><nowiki>checkinstall</nowiki></code> is a program to automatically make a debian package, so it is easy to uninstall or install on similar systems.  <code><nowiki>checkinstall</nowiki></code> will complain loudly about a bad version number.  Make the version something like 4.3-cvs.  Debian package versions must have numbers in them.
 +
<pre><nowiki>
 +
sudo checkinstall
 +
</nowiki></pre>
 +
''Example:''
 +
<pre><nowiki>
 +
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
 +
</nowiki></pre>
 +
Alternatively, you can just <code><nowiki>sudo make install</nowiki></code>.
 
=== Resources ===
 
=== Resources ===
 
* [http://www.octave.org/ GNU Octave website]
 
* [http://www.octave.org/ GNU Octave website]
* [http://octave.sourceforge.net/ GNU Octave Repository] Add ons.
+
* [http://octave.sourceforge.net/ GNU Octave Repository] Add ons.
 
* [http://linuxgazette.net/authors/odonovan.html Articles by Barry O'Donovan] Some introductory articles.
 
* [http://linuxgazette.net/authors/odonovan.html Articles by Barry O'Donovan] Some introductory articles.
 
* [http://octave-gtk.sourceforge.net/ octave-gtk] a GTK+ binding for GNU/Octave.
 
* [http://octave-gtk.sourceforge.net/ octave-gtk] a GTK+ binding for GNU/Octave.
 
* [http://pkg-octave.alioth.debian.org/ Debian Octave Group]
 
* [http://pkg-octave.alioth.debian.org/ Debian Octave Group]
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
[[category:CategoryProgramming]] [[category:CategoryScience]] [[category:CategorySoftware]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年11月17日 (二) 20:15的最新版本

<<Include(Tag/NeedsExpansion)>> 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

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