How to Install Octave in El Capitan?
From my homebrew:

brew info octave
homebrew/science/octave: stable 4.0.0 (bottled), HEAD
high-level interpreted language for numerical computing  
https://www.gnu.org/software/octave/index.html
Not installed


and

brew cask info octave
octave: 3.8.2-1
Octave
https://gnu.org/software/octave/
Not installed


xoctave is a gui which I suspect is independent.  I'd use homebrew for the installation.

FWIW the Octave wiki it explains what to do:

brew tap homebrew/science
brew update &amp;&amp; brew upgrade --all
brew install octave