Skip to content

Instantly share code, notes, and snippets.

@aforren1
aforren1 / octave_from_source.sh
Created February 20, 2017 16:44
Condensed instructions for building octave from source on ubuntu 16.04
# install dependencies, lzip (for extracting compressed file), and checkinstall (for easy uninstall)
sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar lzip checkinstall
# make an octave directory
cd ~
mkdir octave
cd octave
# fetch and extract files -- go to https://ftp.gnu.org/gnu/octave/
# to see if there's a more recent version
// almost word-for-word transcribed from the qrLMM R package
// if you want to operate in unconstrained space,
// mu can be left be
// sigma should be > 0, so log transform
// p should be 0 < p < 1, so logit transform
namespace ald {
// density function
template<class Type>
Type dald(Type y, Type mu, Type sigma, Type p) {