Recently I am working on Stanford Machine Learning Course By Andrew NG on Coursera, Andrew recommended Octave to build prototype quickly. It’s been tricky to install octave on Mac, so I shared my process of intalling it.
1.Install XQuartz
2.Install Xcode and Command Line Tools3
1
|
|
3.Install homebrew
1 2 |
|
It’s important to solve all the warning in homebrew, so it can work smoothly when installing octave.
4.Import the scientific computing packages
1
|
|
5.Install Octave
1
|
|
6.Install gnuplot
1
|
|
(Update: As phseven pointed out, gnuplot will be automatically installed with octave, but in some cases it won’t support X11.) For such cases, do the following:
1 2 |
|
If you plot something in Octave, and it occures problems like this:
1 2 3 |
|
Just run:
1
|
|
befor you plot anything, e.g.,
1
|
|
It will be convenient if you setup Octave startup file: vim ~/.octaverc
and add the line setenv GNUTERM x11
.
7.Open Octave just run octave
, if you want to change the look of your Octave, just input PS1('>> ')
1 2 3 4 |
|
Reference: http://jatinganhotra.com/blog/2014/01/21/installing-octave-on-os-x-10-dot-9-mavericks/