Octave安装和基本使用

octave BrE ˈɒktɪv, AmE ˈɑktəv, ˈɑkˌteɪv

1 简介

1.1 Octave是什么?(斯坦福大学的课程提到这个软件)

Octave是一款用于数值计算和绘图的开源软件。和Matlab一样,Octave 尤其精于矩阵运算:求解联立方程组、计算矩阵特征值和特征向量等等。

1.2 Octave的适用对象

Octave和Matlab被工程人员和科研人员广泛使用来进行各种工业和学术上的数值计算和仿真。例如,NASA 使用它来开发飞行器的对接系统;Jaguar Racing使用它来可视化和分析从 F1 赛车传来的数 据;Sheffield大学用它来开发用于识别癌细胞的软件。Octave这样的软件让编写数值处理程序变得简单,并提供数据可视化的多种方式。

1.3 Octave的下载与安装

octave install

根据自己的系统选择相应的版本,我用的是mac系统:


GNU Octave is primarily developed on GNU/Linux and other POSIX conformant systems. GNU Octave for Mac OS X is readily available using package managers such as Fink, MacPorts, and Homebrew.
About version numbers (as of April 2017):
The 4.2.x are current releases.
The 4.0.x are previous releases.
The 3.8.x or earlier are very old releases.

Octave for MacOS X

download Octave 4.0.3 with graphical user interface

dmg file 323.3MB

Octave入门基础

四则运算

>> 5+6
ans =  11
>> 3-2
ans =  1
>> 3*9
ans =  27
>> 1/2
ans =  0.50000
>> 2^6
ans =  64

逻辑运算

>> 1 == 2 %false
ans = 0
>> 1 ~= 2 %true
ans =  1
>> 0>1 && 0 %AND
ans = 0
>> 9>1 || 1 %OR
ans =  1
>> xor(1,0)
ans =  1

Loading Disqus comments...
Table of Contents