Tag tools Octave help
Tips and tricks
1. Install & load packages required to run the Tag Tools functions
Packages are the Octave equivalent of a Matlab toolbox. To be able to get started with Tag Tools in Octave you will need to have the required package list installed; however, many other optional packages are automatically installed on you system or can be installed from Octave Forge.
Required packages
Package name | Function |
---|---|
control | Computer-Aided Control System Design, required by signal |
io | Input/Output in external formats |
netcdf | A MATLAB compatible NetCDF interface for Octave |
signal | Signal processing tools, requires control |
Optional packages
Package name | Function |
---|---|
database | an interface to SQL databases, currently only postgresql using libpq |
generate_html | Generate HTML pages for function help pages |
gsl | GNU Scientific Library |
image | Image processing |
load lssa | Compute spectral decompositions of irregularly-spaced time series |
load ltfat | The Large Time/Frequency Analysis Toolbox (LTFAT) |
load mapping | Simple mapping and GIS .shp and raster file functions |
load miscellaneous | Miscellaneous tools |
load optim | Non-linear optimization toolkit |
load statistics | Additional statistics functions for Octave |
load struct | Additional structure manipulation functions |
To find out which packages you have installed, how to install and load them follow the instructions below.
⇓a. List all installed packages
The latest versions of Octave automatically install base packages during the installation process. To find out which packages that you have installed on your system use the command pkg list. Here is an example of the packages that were automatically installed on my system when I downloaded and installed GNU Octave, version 4.2.1.
>> pkg list Package Name | Version | Installation directory ---------------------+---------+----------------------- communications | 1.2.1 | C:\Octave\Octave-4.2.1\share\octave\packages\communications-1.2.1 control *| 3.0.0 | C:\Octave\Octave-4.2.1\share\octave\packages\control-3.0.0 data-smoothing | 1.3.0 | C:\Octave\Octave-4.2.1\share\octave\packages\data-smoothing-1.3.0 database | 2.4.2 | C:\Octave\Octave-4.2.1\share\octave\packages\database-2.4.2 dataframe | 1.1.0 | C:\Octave\Octave-4.2.1\share\octave\packages\dataframe-1.1.0 dicom | 0.1.1 | C:\Octave\Octave-4.2.1\share\octave\packages\dicom-0.1.1 financial | 0.5.0 | C:\Octave\Octave-4.2.1\share\octave\packages\financial-0.5.0 fits | 1.0.7 | C:\Octave\Octave-4.2.1\share\octave\packages\fits-1.0.7 fuzzy-logic-toolkit | 0.4.5 | C:\Octave\Octave-4.2.1\share\octave\packages\fuzzy-logic-toolkit-0.4.5 ga | 0.10.0 | C:\Octave\Octave-4.2.1\share\octave\packages\ga-0.10.0 general | 2.0.0 | C:\Octave\Octave-4.2.1\share\octave\packages\general-2.0.0 generate_html | 0.1.13 | C:\Octave\Octave-4.2.1\share\octave\packages\generate_html-0.1.13 geometry | 2.1.1 | C:\Octave\Octave-4.2.1\share\octave\packages\geometry-2.1.1 gsl | 2.0.0 | C:\Octave\Octave-4.2.1\share\octave\packages\gsl-2.0.0 image | 2.6.1 | C:\Octave\Octave-4.2.1\share\octave\packages\image-2.6.1 instrument-control | 0.2.3 | C:\Octave\Octave-4.2.1\share\octave\packages\instrument-control-0.2.3 interval | 2.1.0 | C:\Octave\Octave-4.2.1\share\octave\packages\interval-2.1.0 io | 2.4.5 | C:\Octave\Octave-4.2.1\share\octave\packages\io-2.4.5 linear-algebra | 2.2.2 | C:\Octave\Octave-4.2.1\share\octave\packages\linear-algebra-2.2.2 lssa | 0.1.2 | C:\Octave\Octave-4.2.1\share\octave\packages\lssa-0.1.2 ltfat | 2.2.0 | C:\Octave\Octave-4.2.1\share\octave\packages\ltfat-2.2.0 mapping | 1.2.1 | C:\Octave\Octave-4.2.1\share\octave\packages\mapping-1.2.1 miscellaneous | 1.2.1 | C:\Octave\Octave-4.2.1\share\octave\packages\miscellaneous-1.2.1 nan | 3.1.2 | C:\Octave\Octave-4.2.1\share\octave\packages\nan-3.1.2 netcdf | 1.0.11 | C:\Octave\Octave-4.2.1\share\octave\packages\netcdf-1.0.11 nurbs | 1.3.10 | C:\Octave\Octave-4.2.1\share\octave\packages\nurbs-1.3.10 ocs | 0.1.5 | C:\Octave\Octave-4.2.1\share\octave\packages\ocs-0.1.5 odepkg | 0.8.5 | C:\Octave\Octave-4.2.1\share\octave\packages\odepkg-0.8.5 optim | 1.5.2 | C:\Octave\Octave-4.2.1\share\octave\packages\optim-1.5.2 quaternion | 2.4.0 | C:\Octave\Octave-4.2.1\share\octave\packages\quaternion-2.4.0 queueing | 1.2.5 | C:\Octave\Octave-4.2.1\share\octave\packages\queueing-1.2.5 signal *| 1.3.2 | C:\Octave\Octave-4.2.1\share\octave\packages\signal-1.3.2 sockets | 1.2.0 | C:\Octave\Octave-4.2.1\share\octave\packages\sockets-1.2.0 sparsersb | 1.0.2 | C:\Octave\Octave-4.2.1\share\octave\packages\sparsersb-1.0.2 specfun | 1.1.0 | C:\Octave\Octave-4.2.1\share\octave\packages\specfun-1.1.0 splines | 1.3.2 | C:\Octave\Octave-4.2.1\share\octave\packages\splines-1.3.2 statistics | 1.3.0 | C:\Octave\Octave-4.2.1\share\octave\packages\statistics-1.3.0 stk | 2.3.4 | C:\Octave\Octave-4.2.1\share\octave\packages\stk-2.3.4 strings | 1.2.0 | C:\Octave\Octave-4.2.1\share\octave\packages\strings-1.2.0 struct | 1.0.14 | C:\Octave\Octave-4.2.1\share\octave\packages\struct-1.0.14 tisean | 0.2.3 | C:\Octave\Octave-4.2.1\share\octave\packages\tisean-0.2.3 tsa | 4.4.5 | C:\Octave\Octave-4.2.1\share\octave\packages\tsa-4.4.5 video | 1.2.3 | C:\Octave\Octave-4.2.1\share\octave\packages\video-1.2.3 windows | 1.2.4 | C:\Octave\Octave-4.2.1\share\octave\packages\windows-1.2.4 zeromq | 1.2.1 | C:\Octave\Octave-4.2.1\share\octave\packages\zeromq-1.2.1 >>
⇓b. Load an installed package
To load an installed package use pkg load [package name]. For example to load the package image:
pkg load image
⇓c. Install packages
If the package you need has not installed automatically you can install it with the following command pkg install -option [package name]. For example to install:
pkg install image-1.0.0.tar.gz %Installs the package image from a file
While using -forge option installs a package directly from the Octave-Forge repository. This requires an internet connection and the cURL library.
pkg install -forge signal %Installs the pkg signal from the Octave-Forge repository
⇓d. Load packages automatically at startup
During installation Octave installs a number of base packages that add functionality to the software. Packages are the Octave equivalent of Matlab Toolboxes. In Matlab Toolboxes are automatically installed, loaded and added to the path at start-up if the Toolbox has been supplied by Matlab, user supplied Tools & Toolboxes can be add using Set Path. In Octave Packages are not automatically loaded unless required by the user. To automatically install packages in Octave you will need to Open Octave and edit octaverc file this is equivalent to the Matlab startup.m file.
Editing octaverc
At the command prompt type:
edit octaverc
octavec will open in the Editor Window or Editor Tab. You will be presented with something like this:
## System-wide startup file for Octave. ## ## This file should contain any commands that should be executed each ## time Octave starts for every user at this site. EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'notepad++'), pathsep, EXEC_PATH)); EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'bin'), pathsep, EXEC_PATH)); EDITOR (fullfile (OCTAVE_HOME, 'notepad++', 'notepad++.exe'));
Do not delete or modify any of the above lines from octaverc, unless you are a power user.
Loading packages
To add packages type pkg load followed by the name of the package you want to load. For example you may want to load the control & signal packages:
## System-wide startup file for Octave. ## ## This file should contain any commands that should be executed each ## time Octave starts for every user at this site. EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'notepad++'), pathsep, EXEC_PATH)); EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'bin'), pathsep, EXEC_PATH)); EDITOR (fullfile (OCTAVE_HOME, 'notepad++', 'notepad++.exe')); ## Animal Tag Tools required packages pkg load control %Computer-Aided Control System Design, required by signal pkg load io %Input/Output in external formats pkg load netcdf %A MATLAB compatible NetCDF interface for Octave pkg load signal %Signal processing tools ## Animal Tag Tools Optional packages pkg load database %Interface to SQL databases, currently only postgresql using libpq pkg load generate_html %Generate HTML pages for function help pages pkg load gsl % GNU Scientific Library pkg load image %Image processing pkg load lssa %Compute spectral decompositions of irregularly-spaced time series pkg load ltfat %The Large Time/Frequency Analysis Toolbox (LTFAT) %pkg load mapping %Simple mapping and GIS .shp and raster file functions %pkg load miscellaneous % Miscellaneous tools pkg load optim %Non-linear optimization toolkit pkg load statistics %Additional statistics functions for Octave pkg load struct %Additional structure manipulation functions
Save any changes that you make!