HOME
PDF

my octave cheat sheet

Nasser M. Abbasi

July 2, 2015 page compiled on July 2, 2015 at 2:54am

1 Main octave links

1.
http://en.wikipedia.org/wiki/GNU_Octave
2.
http://www.gnu.org/software/octave/
3.
http://octave.sourceforge.net/index.html

2 How to install octave?

For windows, to install octave 3.8, I downloaded the installer from http://octave.osuv.de/3.8/windows/

  >> ver
  ----------------------------------------------------------------------
  GNU Octave Version 3.8.0
  GNU Octave License: GNU General Public License
  Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 i686

For Linux, easy way is apt-get install octave

might want to do apt-get autoremove before.

3 How to install additional packages?

On octave 3.8, I found an install file called build_packages.m in the folder C:\Octave\Octave-3.8.0\src which is where octave 3.8 was installed using the window installer mentioned above.

Then from octave I simply run the above file. This installed all packages in the src folder

PIC

An example command is pkg ('install', 'communications-1.2.0.tar.gz')

After the above was completed, here is the list

  >> pkg list
  Package Name         | Version | Installation directory
  ---------------------+---------+-----------------------
            actuarial *|   1.1.0 | ...\octave\packages\actuarial-1.1.0
       communications  |   1.2.0 | ...\octave\packages\communications-1.2.0
              control *|   2.6.1 | ...\share\octave\packages\control-2.6.1
       data-smoothing  |   1.3.0 | ...\octave\packages\data-smoothing-1.3.0
  fuzzy-logic-toolkit  |   0.4.2 | ...\packages\fuzzy-logic-toolkit-0.4.2
              general  |   1.3.2 | ...\share\octave\packages\general-1.3.2
             geometry  |   1.7.0 | ...\share\octave\packages\geometry-1.7.0
                image  |   2.2.0 | ...\share\octave\packages\image-2.2.0
                   io  |   1.2.0 | ...\share\octave\packages\io-1.2.0
       linear-algebra  |   2.2.0 | ...\octave\packages\linear-algebra-2.2.0
        miscellaneous  |   1.2.0 | ...\octave\packages\miscellaneous-1.2.0
               odepkg  |   0.8.4 | ...\share\octave\packages\odepkg-0.8.4
                optim  |   1.2.2 | ...\share\octave\packages\optim-1.2.2
           quaternion *|   2.2.0 | ...\octave\packages\quaternion-2.2.0
               signal  |   1.2.2 | ...\share\octave\packages\signal-1.2.2
              sockets  |   1.0.8 | ...\share\octave\packages\sockets-1.0.8
              specfun  |   1.1.0 | ...\share\octave\packages\specfun-1.1.0
               struct  |  1.0.10 | ...\share\octave\packages\struct-1.0.10
              windows  |   1.2.1 | ...\share\octave\packages\windows-1.2.1
               zenity  |   0.5.7 | ...\share\octave\packages\zenity-0.5.7
  >>

Before I used to do this:

go to http://octave.sourceforge.net/index.html find a package you need then type pkg install package_file_name.tar.gz from inside octave

see also this link

http://www.gnu.org/software/octave/doc/interpreter/Installing-and-Removing-Packages.html

4 How to find what packages are installed?

use pkg list