feval_mats

PURPOSE ^

Used to apply the same operation to all .mat files in given directory.

SYNOPSIS ^

function X = feval_mats( fhandle, matcontents, params, srcdir, prefix )

DESCRIPTION ^

 Used to apply the same operation to all .mat files in given directory.

 For each mat in srcdir, loads the mat file, extracts the variables denoted by
 matcontents, applies the function fhandle and stores the result.  matcontents must be a
 cell array of strings, where each string denotes the variable stored in the mat files.
 For example, if each mat file contains two variables y and z, then matcontents should be
 {'y','z'}.  For long operations shows progress information.

 fhandle must point to a function that takes two inputs: vals and params.
 vals is a cell array that contains the values for the variables denoted by matcontents
 and contained in the mat file, and params are the additional static parameters passed to
 feval_arrays.  Continuing the example above vals would be {y,z} - (use deal to extract):
    x=feval(fhandle,{y,z},params) 
 Each returned x must have the same dimensions, X is a concatentation of the returned x's
 along the (d+1) dimension.  

 INPUTS
   fhandle     - function to apply to contents of each mat file [see above]
   matcontents - cell array of strings that denote expected contents of each mat file
   params      - cell array of additional parameters to fhandle (may be {})
   srcdir      - directory containg mat files
   prefix      - [optional] only consider mat files in srcdir of the form prefix_*.mat

 OUTPUTS
   X        - output array [see above]

 DATESTAMP
   29-Sep-2005  2:00pm

 See also FEVAL_IMAGES, FEVAL_ARRAYS

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-May-2006 23:48:50 by m2html © 2003