
4 Usage Examples
4-8
Using Multiple Files and Variable Arguments
The M-file, myplot, takes a single integer input and plots a line from 1 to that
number.
The M-file,
mysum, takes an input of varargin of type integer, adds all the
numbers, and returns the result.
The M-file,
myprimes, takes a single integer input n and returns all the prime
numbers less than or equal to
n.
The Microsoft Excel file,
mymulti.xls, demonstrates these functions in a
multiple of ways.
Note To get started copy the distributed directory xlmulti from
<matlab>\toolbox\matlabxl\examples\xlmulti to <matlab>\work.
Creating the Project
From the MATLAB command prompt, change directories to <matlab>\work.
Enter the command
mxltool to start the MATLAB Excel Builder graphical
user interface. From the
File menu select New Project. This opens the
New Project Settings dialog box.
Kommentare zu diesen Handbüchern