特殊:Badtitle/NS100:Octave
![]() |
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Octave }} |
![]() |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/af | • {{#if: UbuntuHelp:Octave|Afrikaans| [[::Octave/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ar | • {{#if: UbuntuHelp:Octave|العربية| [[::Octave/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/az | • {{#if: UbuntuHelp:Octave|azərbaycanca| [[::Octave/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/bcc | • {{#if: UbuntuHelp:Octave|جهلسری بلوچی| [[::Octave/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/bg | • {{#if: UbuntuHelp:Octave|български| [[::Octave/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/br | • {{#if: UbuntuHelp:Octave|brezhoneg| [[::Octave/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ca | • {{#if: UbuntuHelp:Octave|català| [[::Octave/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/cs | • {{#if: UbuntuHelp:Octave|čeština| [[::Octave/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/de | • {{#if: UbuntuHelp:Octave|Deutsch| [[::Octave/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/el | • {{#if: UbuntuHelp:Octave|Ελληνικά| [[::Octave/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/es | • {{#if: UbuntuHelp:Octave|español| [[::Octave/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/fa | • {{#if: UbuntuHelp:Octave|فارسی| [[::Octave/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/fi | • {{#if: UbuntuHelp:Octave|suomi| [[::Octave/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/fr | • {{#if: UbuntuHelp:Octave|français| [[::Octave/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/gu | • {{#if: UbuntuHelp:Octave|ગુજરાતી| [[::Octave/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/he | • {{#if: UbuntuHelp:Octave|עברית| [[::Octave/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/hu | • {{#if: UbuntuHelp:Octave|magyar| [[::Octave/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/id | • {{#if: UbuntuHelp:Octave|Bahasa Indonesia| [[::Octave/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/it | • {{#if: UbuntuHelp:Octave|italiano| [[::Octave/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ja | • {{#if: UbuntuHelp:Octave|日本語| [[::Octave/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ko | • {{#if: UbuntuHelp:Octave|한국어| [[::Octave/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ksh | • {{#if: UbuntuHelp:Octave|Ripoarisch| [[::Octave/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/mr | • {{#if: UbuntuHelp:Octave|मराठी| [[::Octave/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ms | • {{#if: UbuntuHelp:Octave|Bahasa Melayu| [[::Octave/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/nl | • {{#if: UbuntuHelp:Octave|Nederlands| [[::Octave/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/no | • {{#if: UbuntuHelp:Octave|norsk| [[::Octave/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/oc | • {{#if: UbuntuHelp:Octave|occitan| [[::Octave/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/pl | • {{#if: UbuntuHelp:Octave|polski| [[::Octave/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/pt | • {{#if: UbuntuHelp:Octave|português| [[::Octave/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ro | • {{#if: UbuntuHelp:Octave|română| [[::Octave/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/ru | • {{#if: UbuntuHelp:Octave|русский| [[::Octave/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/si | • {{#if: UbuntuHelp:Octave|සිංහල| [[::Octave/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/sq | • {{#if: UbuntuHelp:Octave|shqip| [[::Octave/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/sr | • {{#if: UbuntuHelp:Octave|српски / srpski| [[::Octave/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/sv | • {{#if: UbuntuHelp:Octave|svenska| [[::Octave/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/th | • {{#if: UbuntuHelp:Octave|ไทย| [[::Octave/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/tr | • {{#if: UbuntuHelp:Octave|Türkçe| [[::Octave/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/vi | • {{#if: UbuntuHelp:Octave|Tiếng Việt| [[::Octave/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/yue | • {{#if: UbuntuHelp:Octave|粵語| [[::Octave/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/zh | • {{#if: UbuntuHelp:Octave|中文| [[::Octave/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/zh-hans | • {{#if: UbuntuHelp:Octave|中文(简体)| [[::Octave/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Octave | UbuntuHelp:Octave | {{#if: | :}}Octave}}/zh-hant | • {{#if: UbuntuHelp:Octave|中文(繁體)| [[::Octave/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Octave|:Octave|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Octave/zh | | {{#ifexist: Octave/zh | | {{#ifeq: {{#titleparts:Octave|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Octave|1|-1|}} | zh | | }}
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