Octave - linux版的Matlab
圖文版 http://blog.pixnet.net/kewang/post/3148685
昨天晚上在上GA的時候,老師說上課要用Matlab,可是我是用linux,哪來的Matlab可以
用,雖然Matlab有linux版,可是聽說要10張小朋友。
所以我就找了一些資料,發現在linux下有蠻多Matlab的替代軟體,像是Octave, Rlab還
有R,這三套在linux上好像都蠻多人在用的。
Octave的首頁就這樣說了,「相容於Matlab」,所以拿來代替Matlab應該是再恰當也不過
了。
GNU Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for solving
linear and nonlinear problems numerically, and for performing other numerical
experiments using a language that is mostly compatible with Matlab. It may
also be used as a batch-oriented language.
Rlab的首頁則是這樣子表示,「Rlab想要做的比Matlab更好」,可是原來的作者Ian
Searle已經停止開發了。停止開發四年後,有另一位叫做Marijan Kostrum的人接手了
Rlab的這個計畫,後來發展成Rlab plus。這感覺怎麼跟BMP和BMPx的關係好像 XDDDD
Rlab is an interactive, interpreted scientific programming environment. Rlab
is a very high level language intended to provide fast prototyping and
program development, as well as easy data-visualization, and processing. Rlab
is not a clone of languages such as those used by tools like Matlab or
Matrix-X/Xmath. However, as Rlab focuses on creating a good experimental
environment (or laboratory) in which to do matrix math, it can be called
``Matlab-like''; since the programming language possesses similar operators
and concepts.
R的首頁是說,「R是一個統計計算的語言」,感覺上好像跟Matlab的用處不同,所以我也
沒有繼續再研究了。
R is a language and environment for statistical computing and graphics. It is
a GNU project which is similar to the S language and environment which was
developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by
John Chambers and colleagues. R can be considered as a different
implementation of S. There are some important differences, but much code
written for S runs unaltered under R.
總之我現在是使用Octave了啦。要安裝Octave很簡單,反正就是apt-get就對了
sudo apt-get install octave2.9
不過Octave沒有內附的image generator,所以我們要利用gnuplot這套軟體來幫助Octave
產生圖形。
sudo apt-get install gnuplot
安裝好之後我們就可以開始使用Octave啦,只要在終端機輸入octave就可以了
首先先輸入一個簡單的函式,看看能不能使用Octave+gnuplot來繪圖。
x=[0 2 4 7 10 12]
y=[3 4 0 6 1 3]
plot(x,y)
如果有出現下面的這個圖,那就大功告成啦!
參考資料:
Octave
Rlab Web Site
Welcome to the RLaB plus 1.0 website
The R Project for Statistical Computing
gnuplot homepage
幾個可以處理矩陣的計算機: octave/rlab/R
--
雜七雜八的kewang部落格 http://kewang.pixnet.net
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.111.73.8
推
03/07 18:21, , 1F
03/07 18:21, 1F
推
03/07 21:52, , 2F
03/07 21:52, 2F
推
03/08 01:03, , 3F
03/08 01:03, 3F
推
03/08 13:26, , 4F
03/08 13:26, 4F
推
03/08 22:07, , 5F
03/08 22:07, 5F
推
03/09 10:52, , 6F
03/09 10:52, 6F
推
03/09 20:57, , 7F
03/09 20:57, 7F
推
03/12 22:28, , 8F
03/12 22:28, 8F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章