If you're looking for the FAQ for comp.soft-sys.matlab, go here: http://www.mit.edu/~pwb/cssm/

You are free to make modifications to this software for any purpose, but you must retain any statements of credit and/or disclaimer statements found within. I request that any modifications that might be useful to others be returned to me for inclusion. Finally, The MathWorks is welcome to include derivatives of this software in future versions of MATLAB; please contact me about this possibility.

`mex sourcefile.c`

from within
MATLAB. Feel free to send me (via email) such missing binaries to
be included on this web page for others.`headerdump(1)`

for a simple example. Just about every possible type of variable
is supported, though some in more detail than others. Try copies
of variables, especially when cell arrays or structs are involved.
For instance, try copying a cell array with several elements.
Then modify a single element. Be creative!Support for R13 and greater added by Gareth Jones. Thanks!

Download from the headerdump directory

`help ndfun`

for full
documentation and examples:` NDFUN Matrix operations on N-D matrices`

NDFUN treats an N-D matrix of double precision
values as a set of pages

of 2D matrices, and performs various matrix
operations on those pages.

The BLAS and LAPACK routines compiled into MATLAB
are used for all these

operations, so results will be very close, and are
usually identical, to

"native MATLAB results". Available commands
are:

C = NDFUN('mult', A, B)

C = NDFUN('backslash', A, B)

C = NDFUN('inv', A)

C = NDFUN('eig', A)

[C, D] = NDFUN('eig', A)

C = NDFUN('version')

The two-argument commands perform operations
equivalent to:

for i=1:N

C(:,:,i) = A(:,:,i) * B(:,:,i);

end

The one-argument command

for i=1:N

C(:,:,i) = inv(A(:,:,i));

end

Any number of dimensions is supported, but
dimensions > 2 must match:

C = ndfun('mult',
rand(4,3,2,2,2), rand(3,1,2,2,2))

C will have size = [4 1 2 2 2]

NDFUN will reuse 2D arguments when needed, much like
scalar

operations. A single 2D matrix can be
multiplied (or solved with)

each 2D page of the other argument. For
instance:

A = rand(4,3); B =
rand(3,10,100);

C = ndfun('mult', A, B);

is equivalent to:

for i=1:100

C(:,:,i) = A * B(:,:,i);

end

The reverse also works. These types of
operations are especially

efficient for the backslash operator.

Download from the NDFUN directory.

From the comments:

```
/* splitstr.c: MEX file that splits a string based an arbitrary
character
```

*

* C = SPLITSTR(S) splits the string S at newlines and returns a
cell

* array where each element is a word.

*

* C = SPLITSTR(S, DELIM) uses the character DELIM as the
delimiter.

* The strings '\n' and '\t' can be used to represent newline and
tab

* characters, respectively.

*

* Peter Boettcher <boettcher@ll.mit.edu>

* Copyright 2002

* Last modified: <Tue Jul 30 11:32:13 2002 by pwb>

*/

Here it is: splitstr.c
Drop the new avi.c into $MATLABROOT\toolbox\matlab\iofun\@avifile\private
(making appropriate backups of avi.c and avi.dll) and compile using:

mex avi.c aviutil.c vfw32.lib user32.lib

I suspect mex must be set up to use Visual C for this to work. Here's the file:

avi.c

Peter Boettcher <boettcher@ll.mit.edu>