We offer a selection of nutritious
Matlab^{®} M-files for Version-5+, some of which may be just the treats
you have been seeking. These items were prepared from natural ingredients -- no
Mex-files to build or toolboxes to buy. They have been tested extensively in our
own software and data-processing kitchens.

Our aim is to provide convenient syntax and functionality that is not available in the basic Matlab distribution. In a few cases, existing Matlab "features" are corrected, circumvented, or augmented, as the case may be.

The M-files are written in a style that preserves their pedagogical value. In addition, many of them provide a self-demonstration when the corresponding function-name is executed with no argument or with 'demo' as a single argument. See "help ..." for each function.

Some of the offerings, mainly class-oriented libraries, have been encoded into self-expanding P-files. When executed as Matlab functions at the Matlab prompt, these will populate one or more folders with several M-files. A dialog is invoked automatically to help select the area.

So, have a seat, roll up your sleeves, and enjoy your meal. (Massachusetts State Law: Employees must first wash hands.)

New items are marked by: *** New ***

**To download an M-file**, click on the corresponding link. If the M-file becomes displayed in the browser window, use the "File/Save As ..." menu to save it as**"Text"**. Alternatively, "Netscape" users can hold the mouse-button down on the link and choose "Save this Link as ..." in the popup menu to save it as "Text"The M-files are plain

**TEXT**, with lines terminated by carriage-returns. Use fixnl.p (see below) to change newlines to the style compatible with your editor.**To download a P-file**, click on the corresponding link. If the P-file becomes displayed in the browser window, use the "File/Save As ..." menu to save it as**"Source"**. Alternatively, "Netscape" users can hold the mouse-button down on the link and choose "Save this Link as ..." in the popup menu to save it as "Source". The P-files are pure**BINARY**. To expand a P-file, execute its name (excluding the ".p") at the Matlab prompt. NOTE: If you are replacing an earlier version, rename the old folder, restart Matlab, then execute the P-file. Requires Matlab 5.2+.**Adjust your Matlab path so Matlab can find the new files.**

**House Specialties****NetCDF Toolbox**- NetCDF Toolbox Home Page -- Complete NetCDF language/interface for Matlab. Full details and software at that site.
**Generic Class Toolbox**

- generic_install.m -- Open the door to Matlab operators. This is a killer-class that makes Matlab do all the work. We demonstrate its value as a base-class in three toolboxes below. Requires Matlab 5.2+.
**Interval Arithmetic Toolbox**- interval_install.p -- Perform interval-arithmetic with all Matlab operators. Thanks to the "generic" base-class, very little had to be written here to make linear interval-arithmetic feasible in Matlab. Not a geeky industrial-strength package, but still pretty interesting nonetheless. Requires Matlab 5.2+, generic_install.m and bigint_install.m.
**BigInt Toolbox**- bigint_install.m Arithmetic with big integers. Requires Matlab 5.2+.
**Matfile Toolbox**- matfile_install.p -- Manipulate Mat-file variables as if they were regular Matlab workspace variables. Requires Matlab 5.2+ and generic_install.m.
**Vivace Toolbox**- vivace_install.p -- This toolbox contains two classes: 'viva" and "smart". The "viva" class manages "virtual variables" that are composites of other array-like variables that respond to "(...)" indexing in the usual way. The "smart" class encapsulates ordinary Matlab variables in a scope-free manner. Requires Matlab 5.2+ and generic_install.m.
**SnackBar Blue Plate Special**- For Matlab 5.2+ users who want all of the M-files that lie below this point, they are bundled together as snackbar_install.m. Download this installer as text, put it in your Matlab path, "cd" to where you want the "snackbar" folder to be created, then execute "snackbar_install" at the Matlab prompt. Adjust your Matlab path accordingly.
(Note: If the "snackbar" folder already exists, its M-files will be overwritten with the corresponding functions in the installer.)

**Arithmetic**- polyfitn.m -- Self-demonstrating ND polynomial fit. Also get polyvaln.m. *** New *** 30Apr2003.
- qsum1.m -- Generalized multiply-and-sum, for any number of arrays and dimensions. *** Updated *** 26Feb2001.
- tensor_mul.m -- Multiply tensors. Companion of tensor_sol.m.
- tensor_sol.m -- Solve tensor system A*x = b for x. Companion of tensor_mul.m.
- tensor_test.m -- Test tensor arithmetic. Requires tensor_mul.m and tensor_sol.m.
- xabx.m -- Solve matrix system x*A + B*x = c for x.
**Batch Processing**- batch_install.m -- Batch processing toolbox. When batch-mode is active, procedures can retrieve data from the batch-script itself.
**Class-Oriented Programming**- describe.m -- Describe an object.
- end.m -- Process "end" as an index.
- inherit.m -- Execute super-class method.
- numel.m -- NUMEL method for classes in Matlab 6.1.
- super.m -- Super-object of an object.
**Date/Time/Location**- dateaxis.m -- Resizeable date-axis.
- deg2dms.m -- Decimal-degree to deg-min-sec string or numbers.
- dhms.m -- Decimal-day to/from '11d22h33m44s' day-hour-minute-second string.
- datenum2julian.m -- Convert Matlab datenum to Julian day. Companion of julian2datenum.m.
- julian2datenum.m -- Convert Julian day to Matlab datenum. Companion of datenum2julian.m.
- yearday.m -- Year and day-of-year from date or vice-versa.
**Directories**- at.m -- Set default directory from M-File name. Same behavior as setdef.m.
- setdef.m -- Set default directory from M-File name.
- setdir.m -- Set working directory via dialog. Requires guido.m.
**Files**- calls.m -- M-files called by a function. Self-demo.
- dirinfo.m -- Info on contents of directory.
- fcat.m -- Concatenate files.
- fcomment.m -- Convert non-data lines in ascii file to Matlab-like comments. Also see loadsafe.m.
- fig2jpeg.m -- Save figure to file in JPEG format.
- findstr1.m -- String-search with * wildcards. Self-demo.
- fixnl.m -- Convert file newlines to current machine style. Also get fixnl.p.
- fixnl.p -- P-code version of fixnl.m. Works on all machines. Requires Matlab 5.2+.
- fsearch.m -- String-search with * wildcards in multiple files and directories. Self-demo.
- lineno.m -- Display m-filename and line-number wherever this function is called. Self-demo.
- ll.m -- Verbose listing of files. Self-demo.
- loadsafe.m -- Load ascii file that may contain comments and non-rectangular data. Also see fcomment.m.
- lsd.m -- LS with sub-directories marked. Self-demo.
- vi.m -- Edit an m-file on the Matlab path using Unix "vi".
- which1s.m -- "WHICH" for each component of the Matlab path, to isolate duplicate functions, if any. Self-demo.
**Grid Generation**- fps.m -- Fast Poisson solver. Uses fpt.m.
- fpt.m -- Fast Poisson transform.
- rect.m -- Conformal mapping of (x, y) contour to a rectangle.
- rect2grid.m -- Grid generation for irregular perimeter. Uses rect.m and fps.m.
- tsearchsafe.m -- Reliable TSEARCH for non-overlapping triangles, not necessarily produced by DELAUNAY.
**GUI**- again.m -- Places an "Again" pushbutton in the current window, which evaluates its string-argument(s) whenever the button is pressed. Execute "again('demo')" for a self-demonstration.
- filepick_install.m -- Select one or more files via dialog. Syntax similar to "uigetfile". The installer will populate a new directory called "filepick". ** New Version 15Jun2001 **.
- findobjs.m -- Find handles of GUI entities, using relational operators. Replaces "findobj". Execute "findobjs('demo')" for a self-demonstration.
- getsafe.m -- Fault-tolerant "get" function. Self-demo.
- guido.m -- Automatic dialog, patterned on the fields of a Matlab "struct". Execute "guido('demo')" for a self-demonstration. Note: "guido" uses setinfo.m and getinfo.m internally, but you may get them separately here.
- hint.m -- Scrolling window for displaying a static message, such as help. Execute "hint('demo')" for a self-demonstration.
- listpick_install.p -- GUI for selecting from a list of strings, with or without replacement. Download as pure-binary, then execute "listpick_install" at the Matlab prompt to install the "listpick" class. After adjusting your Matlab path, execute "listpick demo" for a self-demonstration.
- setsafe.m -- Fault-tolerant, non-redundant "set" function, useful especially with X-Windows systems for overcoming excessive screen-updates. For example, instead of "figure(theFigureHandle)", use "setsafe(0, 'CurrentFigure', theFigureHandle) to avoid a screen-update when theFigureHandle is already the "gcf". Self-demo.
- stext_install.m -- M-file installer for Doug Schwarz's STEXT Toolbox, as of 25Sep2001.
- suspend.m -- Creates a "Suspend" button in a separate figure-window. It can be clicked and checked to determine whether to suspend execution. Execute "suspend('demo')" for a self-demonstration.
- uidefaults.m -- Default settings for HandleGraphics types.
- uilayout.m -- Layout a set of GUI items, using a matrix of indices as a template. Throw off the shackles of "GUIDE". Execute "uilayout('demo')" for a self-demonstration.
**Interpolation.**- sliceg.m -- Interpolate (x, y, z) surface or volume along an irregular track of arbitrary (x, y) points. Self-demo.
**Line Simplification.**- crossings.m -- Crossings of a polyline by a line. Self-demo.
- geo_simplify.m -- Simplify a geographic polyline.
- xy_simplify.m -- Simplify a Cartesian polyline.
**Mat-Files**- matfile_install.p -- Manipulate Mat-file variables as regular Matlab workspace variables. Requires Matlab 5.2+.
- save4.m -- Versatile "save" for Matlab v4 Mat-file format. Self-demo. ** NEW 18Jan2002 **
**Miscellaneous**- ascii.m -- Display ascii character set.
- assign.m -- Assign a value to an argument.
- basic_english.m -- "Basic English" word-list of Charles Kay Ogden.
- beep.m -- Beep N times.
- begets.m -- Display function arguments and results.
- demonstrate.m -- Evaluate and display a command.
- genetic.m -- Simple genetic algorithm for optimization.
- identical.m -- NaN-safe version of "isequal".
- insidesafe.m -- Determine whether points are inside polygon.
- int2english.m -- Convert integer to English text.
- mailto.m -- Invoke "mailto" facility in web-browser.
- mst.m -- Minimal spanning tree.
- nefis_install.m -- NEFIS file classes -- very preliminary.
- snowfall.m -- History of the first trace of snow in Boston, from 1891 to 1999.
- spar.m -- Convert multidimensional array to "spar" form. The inverse is unspar.m, available below.
- swap.m -- Swap two variables.
- throw.m -- Throw an exception. Requires Matlab 5.2+.
- undoc.m -- Undocumented graphics properties.
- unspar.m -- Inverse of spar.m, available above.
- vi.m -- Edit an m-file on the Matlab path using Unix "vi".
- whov.m -- WHOS plus values.
**Mouse**- blinksafe.m -- Makes plotted lines clickable, enabling the visibility of individual points to be toggled. Execute "blinksafe('demo')" for a self-demonstration. Also see marksafe.m.
- busy.m -- "Busy" mouse cursor. idle.m.
- idle.m -- "Idle" mouse cursor. Companion of busy.m.
- doubleclick.m -- Sensible double-click detection.
- findpt.m -- Mouse-tracking along plotted lines.
- marksafe.m -- Makes plotted lines clickable, allowing individual points to be marked. Execute "marksafe('demo')" for a self-demonstration. Also see blinksafe.m.
- rbrect.m -- Drag-out a rectangle with the mouse.
- ydrag.m -- Modify y positions of x-y line plot by hand. Self-demo. *** NEW 05Dec2001 ***
- zoomsafe.m -- Reliable zooming. Requires rbrect.m.
**Movies**- movie1.m -- Smooth movie display. Self-demo.
**Parts**- parts.m -- Parts of a compound item. Requires partnames.m.
- partnames.m -- Part-names of a compound item.
**Plotting**- arrowsafe.m -- Intelligent arrows. Execute "arrowsafe('demo')" for a self-demonstration. Also see "sticksafe.m".
- bgtext.m -- Text on colored background patch.
- label1.m -- Label first of two-layer plot.
- label2.m -- Label second of two-layer plot.
- labelsafe.m -- Safe label conversion.
- nofigs.m -- Delete all figures.
- plot1.m -- First of two-layer plot. Requires vargstr.m.
- plot2.m -- Second of two-layer plot. Requires vargstr.m.
- sortplot.m -- Plot by sorted chunks.
- stackplot.m -- Non-overlapping plot of several curves.
- starsafe.m -- Intelligent stars. Execute "starsafe('demo')" for a self-demonstration. Requires symbsafe.m.
- sticksafe.m -- Intelligent sticks. Execute "sticksafe('demo')" for a self-demonstration. Also see "arrowsafe.m".
- subplotsafe.m -- Versatile subplot layout. *** NEW 18Oct2001 ***
- symbsafe.m -- Intelligent symbols.
- vargstr.m -- Varargin/varargout "eval" string.
- wigglex.m -- Wiggle-plot with swings in x-direction.
- wiggley.m -- Wiggle-plot with swings in y-direction.
**Spicy Noodles**- fpeval.m -- FEVAL by full-path name. Use this routine to call procedures outside the Matlab path, including those in "private" areas, such as the bashful "toolbox/signal/private/chi2conf" function. Requires Matlab 5.2+.
- uidelete.m -- Delete file(s) by dialog. Not for the faint-of-heart.
**Triangulation**- tri_install.m -- Triangulation utilities. Download this installer, then execute "tri_install" at the Matlab prompt. (Be sure that the current directory is writeable.) It will create and populate a sub-directory called "tri", containing several utilities for dealing with triangulations. Add "tri" to your Matlab path, then execute "tri_demo" at the Matlab prompt. Many of the functions are self-demonstrating. Try "trigui", for example. *** Updated *** 30Apr2003.