Tree-Ring Matlab Toolbox

Home Vita Course Toolbox Contact


Matlab is a commercial software package for numeric computation, graphics, visualization, and high-level programming. Matlab is available from The MathWorks, Inc. The basic Matlab package has many functions generally useful for tree-ring studies. Matlab "toolboxes" with specialized functions can also purchased from The MathWorks, Inc. Toolboxes are available for signal processing, mapping, image processing, neural networks, statistics, and many other topics.

The "Tree-Ring Toolbox" is not a commercially available Matlab toolbox, but is a collection of Matlab functions I have written to do various tasks in tree-ring analysis. For example, the function crn2vec2 reads an ITRDB-formatted ".crn" file and returns the site chronology, years, and sample size as matlab vectors.
Back to Top of Page


To use the Tree-Ring Toolbox, you must have Matlab installed on your computer or network. I use the University of Arizona Matlab site license, which has the most recent Matlab release. The functions may not work on older versions. Depending on which functions you intend to use, you may also need to have one or more "Matlab toolboxes" (e.g., statistics) installed. The comment section of each function lists which toolboxes are required. Some functions requre statistics, signal processing or spline toolboxes.

To use the Tree-Ring Toolbox, you must its functions in a directory on your Matlab path. My functions usually call on other utility functions I wrote. The best method to be sure you don't call an "unknown" function is to download the whole set of Tree-Ring Toolbox functions. I have zipped these into a file, which you should unzip into a directory on your Matlab path. I recommend keeping those functions by themselves (not with any of your own user-written functions, not with your data files) in a single dedicated directory. I distribute these function freely. I require no acknowledgement of the source. Go ahead and modify them as you wish. I welcome any comments on the functions in the function list. But due to time constraints, I cannot promise anything more than grudging cooperation in updating or correcting functions when I'm in the mood.

Back to Top of Page


To find out what's in the Tree-Ring Matlab Toolbox, check out the list of functions Click on a function in the list and you will see the opening comment section of the function. The comment section of each function is organized as follows:

  1. function name with 1-line description
  2. syntax of the function call
  3. date of most recent revision
  4. extended description of what the function does
  5. Input requirements
  6. Output
  7. References
  8. UW Functions Called (other functions I wrote)
  9. Matlab toolboxes required (e.g., signal processing)
These comment sections are intended to give you a flavor for what the function does and to describe the necessary inputs. I use a shorthand code to indicate the form of the input and output arguments. The best way of describing this code is by way of example:
(1x1)r  real number, scalar
(3x2)r  matrix (3 x 2) of real numbers 
(3x1)i  column vector (3 elements) of integers
(1x8)s  character string of length 8
(1x1)L  logical scalar

Matlab also has data types called "cells" and "structures", which are best found out about by reading the Matlab documentation. My code for cells uses braces. For example, the code below indicates a 1 x 3 "cell" variable containing a 2x2 integer matrix, a 1x5 character string and a 1x10 row vector of real numbers.
  (2 x 2)i
  (1 x 5)s
  (1 x 10)r  

For brevity of web page I include only the first part of the opening comments section for each function. If you actually download and use the functions I suggest reading the "Notes" section of the comments, which has more information. You can view the Notes section and the whole function with any text editor. I've also included sample data for some functions in The sample data is in a zip file coded with the name of the relevant function (e.g., "".
Back to Top of Page

List of Functions