Excel Link 3 User Guide
Excel Link 3 User Guide
Users Guide
Contents
Getting Started
1
What Is Excel Link? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-3
1-3
1-3
1-3
1-4
1-5
1-5
1-6
1-8
1-8
1-8
1-8
1-9
About Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Excel Link Functions Differ from Microsoft Excel
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Types of Excel Link Functions . . . . . . . . . . . . . . . . . . . . . . .
Using Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Working with Arguments in Excel Link Functions . . . . . . .
Using the MATLAB Function Wizard for Excel Link . . . . .
Create Macros for Excel Link Functions . . . . . . . . . . . . . . .
1-10
Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-20
1-22
1-10
1-10
1-11
1-13
1-13
1-17
2
About the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2
2-3
2-3
2-6
Data Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-9
2-13
2-16
2-20
Functions By Category
vi
Contents
3-2
3-3
4
Error Messages and Troubleshooting
A
Excel Cell Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . .
A-2
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A-6
A-10
Data Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Matrix Data Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Errors When Opening Saved Worksheets . . . . . . . . . . . . . .
A-11
A-11
A-11
Examples
B
Macro Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-2
Financial Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-2
Index
vii
1
Getting Started
What Is Excel Link? (p. 1-2)
Getting Started
1-2
System Requirements
For information on hardware and software requirements for Excel Link, see
http://www.mathworks.com/products/excellink/requirements.html.
Excel Link requires MATLAB for Windows. For best results with MATLAB
figures and graphics, set the color palette of your display to a value greater
than 256 colors:
1 Click Start > Settings > Control Panel > Display.
2 Click the Settings tab. Choose an appropriate entry from the Color
Palette menu.
1-3
Getting Started
1-4
Note These instructions are for Excel 2003 and earlier versions. For
instructions on how to configure Excel 2007 to Work with Excel Link, see
The MathWorks Support Web site.
matlabroot/toolbox/exlink.
4 Click OK.
The Excel Link add-in loads now and with each subsequent invocation of
Excel.
Note the MATLAB Command Window button on the Windows taskbar.
1-5
Getting Started
Start
MATLAB
Execute MATLAB
command
Start MATLAB
Function Wizard for
Excel Link
Set MATLAB
Preferences
1-6
Preferences include:
Start MATLAB when Excel starts (enabled by default) starts
MATLAB automatically when Excel starts.
MATLAB current working directory enables you to specify the current
working directory for your MATLAB session at startup.
Use MATLAB desktop starts the entire MATLAB desktop, including
the current directory, workspace, command history and command window
panes, when Excel starts.
Force use of MATLAB cell arrays with MLPutMatrix enables you to
set the MLPutMatrix function to use cell arrays for transfer of data between
Excel Link and MATLAB.
Treat missing/empty cells as NaN sets data in missing or empty cells to
NaN or zero.
1-7
Getting Started
Watch for the MATLAB Command Window button on the Windows taskbar.
1-8
1-9
Getting Started
About Functions
In this section...
How Excel Link Functions Differ from Microsoft Excel Functions on page
1-10
Types of Excel Link Functions on page 1-10
Using Worksheets on page 1-11
Working with Arguments in Excel Link Functions on page 1-13
Using the MATLAB Function Wizard for Excel Link on page 1-13
Create Macros for Excel Link Functions on page 1-17
Note Excel operations and function keys may behave differently with Excel
Link functions.
1-10
About Functions
Excel Link provides two types of functions: link management functions and
data management functions.
Link management functions initialize, start, and stop Excel Link and
MATLAB. Any link management function other thanmatlabinit can be
invoked as a worksheet cell formula or in macros. This function must be
invoked from the Excel Tools Macro menu or in macro subroutines.
Data management functions copy data between Excel and MATLAB and
execute MATLAB commands from Excel. Any data management function
other than MLPutVar and MLGetVar can be invoked as a worksheet cell
formula or in macros. These functions can be invoked only in macros.
For more information about Excel Link functions, see Chapter 3, Functions
By Category.
Using Worksheets
Entering Functions into Worksheet Cells
Excel Link functions expect A1-style worksheet cell references; that is,
columns designated with letters and rows with numbers. This is the default
reference style. If your worksheet shows columns designated with numbers
instead of letters:
1 Click Tools > Options.
2 Click the General tab.
3 Under Settings, clear the R1C1 reference style check box.
1-11
Getting Started
Note Do not use the Excel Function Wizard, as it can generate unpredictable
results.
If you use explicit cell addresses in a function and then later insert or delete
rows or columns, or move or copy the function to another cell, you need to edit
the function arguments to reference the new cell address. Excel Link does not
automatically adjust cell addresses in functions.
1-12
About Functions
Variable-name Arguments
You can directly or indirectly specify a variable-name argument in most
Excel Link functions.
Data-location Arguments
A data-location argument must be a worksheet cell address or range name.
Do not enclose a data-location argument in quotation marks (except in
MLGetMatrix, which has unique argument conventions).
A data-location argument can include a worksheet number; for example,
Sheet3!B1:C7 or Sheet2!OUTPUT.
Note You can use virtually any special character as part of a worksheet
name if you embed the sheet name within single quotation marks ('')
when referencing it in MLGetMatrix or MLPutMatrix.
1-13
Getting Started
1-14
About Functions
Use The MATLAB Function Wizard for Excel Link to do the following:
1 Display a list of all MATLAB working directories and function
categories
All directories or categories in the current MATLABPATH display in the
Select a category field. Click an entry in the list to select it. Each
entry in the list displays as a directory path plus a description read from
the Contents.m file in that directory. If no Contents.m file is found, the
directory/category display notifies you as follows:
finance\finsupport -(No table of contents file)
1-15
Getting Started
1-16
About Functions
If you specify a target range of cells using the Optional output cell(s)
field in the Function Arguments dialog box, the selected function appears in
the current spreadsheet cell using MATLABSUB, with an additional argument
to indicate where to write the functions output. In the following example,
the target cell is B2 and the input to the rand function comes from A2:
=matlabsub("rand","Sheet1!$B$2",Sheet1!$A$2)
4 Display online help headers for functions
Note In macros, leave a space between the function name and the first
argument; do not use parentheses.
1-17
Getting Started
1-18
About Functions
Option Base 1
Sub Method1()
MLShowMatlabErrors "yes"
'''To MATLAB:
Dim Vone(2, 2) As Double
Vone(1, 1) = 1
Vone(1, 2) = 2
Vone(2, 1) = 3
Vone(2, 2) = 4
'Input
1-19
Getting Started
MatlabRequest
End Sub
7 To run the code, press F5 or click Run > Run Sub/UserForm.
Dates
Default Excel date numbers represent the number of days that have passed
since January 1, 1900; for example, May 15, 1996 is represented as 35200
in Excel.
However, MATLAB date numbers represent the number of days that have
passed since January 1, 0000, so May 15, 1996 is represented as 729160 in
MATLAB. Therefore, the difference in dates between Excel and MATLAB is a
constant, 693960 (729160 minus 35200).
To use date numbers in MATLAB calculations, you must apply the 693960
constant as follows:
Add it to Excel date numbers that are read into MATLAB.
Subtract it from MATLAB date numbers that are read into Excel.
Note If you use the optional Excel 1904 date system, the constant is
695422.
1-20
Dates
Note Dates are stored internally in Excel as numbers and are not affected
by locale.
1-21
Getting Started
1-22
2
Solving Problems with
Excel Link
About the Examples (p. 2-2)
2-2
Worksheet Version
1 Click the Sheet1 tab on the ExliSamp.xls window. The worksheet for
2-3
2 Make E5 the active cell. Press F2; then press Enter to execute the Excel
Link function that copies the sample data set to MATLAB. The data
set contains 25 observations of three variables. There is a strong linear
dependence among the observations; in fact, they are close to being scalar
multiples of each other.
3 Move to cell E8 and press F2; then press Enter. Repeat with cells E9 and
E10. These Excel Link functions tell MATLAB to regress the third column
of data on the other two columns. They create a single vector y containing
the third-column data, and a new three-column matrix A consisting of a
column of ones followed by the rest of the data.
4 Execute the function in cell E13. This function computes the regression
2-4
the original data with fit; sort the data in increasing order and apply
the same permutation to fit; and create a scalar for the number of
observations.
7 Execute the functions in cells E24 and E25. Often it is useful to fit a
original data (blue circles), the regressed result fit (dashed red line), and
the polynomial result (solid green line); and adds a legend. Data plots.
2-5
Since the data is closely correlated but not exactly linearly dependent, the
fit curve (dashed line) shows a close, but not an exact, fit. The fifth-degree
polynomial curve, newfit, represents a more accurate mathematical model
for the data.
When you finish this version of the example, close the figure window.
Macro Version
1 Click the Sheet2 tab on ExliSamp.xls. The worksheet for this example
appears.
2-6
Cell A4 calls the macro CurveFit, which you can examine from the Visual
Basic environment.
3 While this module is open, click Tools > References. In the References
dialog box, make sure that the excllink.xla check box is selected. If not,
select the check box and click OK.
4 In cell A4 of Sheet2, press F2; then press Enter to execute the CurveFit
macro. The macro executes the same functions as the worksheet example
(in a slightly different order), including plotting the graph. In addition, it
uses the MLGetMatrix function in the CurveFit macro to copy the original
data y (sorted), the corresponding regressed data fit, and the polynomial
data newfit, to the worksheet.
2-7
2-8
Data Interpolation
Data Interpolation
Interpolation is a process for estimating values that lie between known data
points. It is important for applications such as signal and image processing
and data visualization. MATLAB provides a number of interpolation functions
that let you balance the smoothness of data fit with execution speed and
efficient memory use.
This example uses a two-dimensional data-gridding interpolation function
on thermodynamic data, where volume has been measured for time
and temperature values. It finds the volume values underlying the
two-dimensional, time-temperature function for a new set of time and
temperature coordinates.
The example uses an Excel worksheet to organize and display the original
data and the interpolated output data. Excel Link functions copy the data to
and from MATLAB, execute the MATLAB interpolation function, and invoke
MATLAB graphics to display the interpolated data in a three-dimensional
color surface.
1 Click the Sheet3 tab on ExliSamp.xls. The worksheet for this example
appears.
2-9
Link function that passes the Time, Temp, and Volume labels to MATLAB.
3 Make A34 the active cell. Press F2; then press Enter to execute the Excel
Link function that copies the original time data to MATLAB. Move to
2-10
Data Interpolation
cell A35 and execute the function to copy the original temperature data.
Execute the function in cell A36 to copy the original volume data.
4 Move to cell A39 and press F2; then press Enter to copy the interpolation
time values to MATLAB. Execute the function in cell A40 to copy the
interpolation temperature values.
5 Execute the function in cell A43. griddata is the MATLAB two-dimensional
volume data and copy it to the Excel worksheet. The data fills cells F7:T30,
which are enclosed in a border.
7 Execute the function in cell A50. MATLAB plots and labels the interpolated
2-11
2-12
1 Click the Sheet4 tab on ExliSamp.xls to open the worksheet for this
example.
2-13
then execute the functions in D11 and D12 to copy the price data to Excel.
The worksheet looks like this.
2-14
Read the asset price tree this way: Period 1 shows the up and down prices,
Period 2 shows the up-up, up-down, and down-down prices, Period 3 shows
the up-up-up, up-up, down-down, and down-down-down prices, and so on.
Ignore the zeros. The option value tree gives the associated option value for
each node in the price tree. The option value is zero for prices significantly
above the exercise price. Ignore the zeros that correspond to a zero in the
price tree.
4 Try changing the data in B4:B10 and reexecuting the Excel Link functions.
Note, however, that if you increase the time to maturity (B7) or change the
time increment (B8), you may need to enlarge the output tree areas.
5 When you finish the example, close the figure window.
2-15
1 Click the Sheet5 tab on ExliSamp.xls. The worksheet for this example
appears.
2-16
2 Make A15 the active cell. Press F2; then press Enter to execute the
Excel Link function that transfers the labels describing the outputs to
be computed by MATLAB.
3 Make A16 the active cell to copy the portfolio return data to MATLAB.
4 Execute the functions in A19 and A20 to compute the Financial Toolbox
data to Excel.
The worksheet looks like this.
2-17
The data describes the efficient frontier for these three portfolios: that set
of points representing the highest rate of return (ROR) for a given risk. For
each of the 20 points along the frontier, the weighted investment in each
portfolio (Weights) would achieve that rate of return.
6 Now move to A28 and press F2; then press Enter to execute the Financial
Toolbox function that plots the efficient frontier for the same portfolio data.
The following figure appears in MATLAB.
2-18
The light blue line shows the efficient frontier. Note the change in slope
above a 6.8% return because the Corporate Bond portfolio no longer
contributes to the efficient frontier.
7 To try running this example using different data, close the figure window
and change the data in cells B4:D9. Then reexecute all the Excel Link
functions. The worksheet then shows the new frontier data, and MATLAB
displays a new efficient frontier graph.
When you finish this example, close the figure window.
2-19
appears.
2 Make A18 the active cell. Press F2, then Enter to execute the Excel Link
2-20
3 Make A19 the active cell to transfer the column vector Coupon Rate to
MATLAB.
4 Make A20 the active cell to transfer the settlement date to MATLAB.
5 Execute the functions in cells A23 and A24 to enable Financial Toolbox to
2-21
8 Finally, execute the function in cell A37 to display a MATLAB plot of the
2-22
3
Functions By Category
Link Management Functions (p. 3-2)
Functions By Category
3-2
matlabinit
MLAutoStart
MLClose
MLOpen
MLUseCellArray
matlabsub
MLAppendMatrix
MLDeleteMatrix
MLEvalString
MLGetFigure
MLGetMatrix
MLGetVar
MLMissingDataAsNaN
MLPutMatrix
MLPutVar
MLShowMatlabErrors
MLStartDir
MLUseFullDesktop
3-3
3-4
Functions By Category
4
Functions Alphabetical
List
matlabfcn
Purpose
Syntax
Description
Examples
Worksheet:
matlabfcn(command, inputs)
command
inputs
Passes the command to MATLAB for evaluation given the function input
data. The function returns a single value or string depending upon the
MATLAB output. The result is returned to the calling worksheet cell.
This function is intended for use as an Excel worksheet function.
matlabfcn("sum", B1:B10)
sums the data in the spreadsheet cells B1 through B10 returning the
output to the active worksheet cell or Excel Visual Basic for Applications
(VBA) output variable.
matlabfcn("plot", B1:B10, "x")
plots the data in worksheet cells B1 through B10 using x as the marker
type.
See Also
4-2
matlabsub
matlabinit
Purpose
Syntax
matlabinit
Note To run matlabinit, pull down the Excel Tools menu and click
Macro. In the Macro Name/Reference box, enter matlabinit and
click Run. Alternatively, you could include this function in a macro
subroutine. You cannot run matlabinit as a worksheet cell formula or
in a macro function.
Description
See Also
MLAutoStart, MLOpen
4-3
matlabsub
Purpose
Syntax
Description
Worksheet:
command
edat
inputs
Caution edat must not include the cell that contains the matlabsub
function. In other words, be careful not to overwrite the function itself.
Also make sure there is enough room in the worksheet to write the
matrix contents. If there is insufficient room, the function generates a
fatal error.
4-4
matlabsub
Examples
sums the data in worksheet cells B1 through B10, returning the output
to cell A1.
See Also
matlabfcn
4-5
MLAppendMatrix
Purpose
Syntax
Worksheet:
MLAppendMatrix(var_name, mdat)
Macro:
var_name
mdat
Description
4-6
MLAppendMatrix
Examples
appends the data in cell range A1:A2 to the MATLAB matrix B. B is now
a 2-by-3 matrix with the data from A1:A2 in the third column.
A1
A2
appends the data in cell range A1:B2 to B. B is now a 4-by-2 matrix with
the data from A1:B2 in the last two rows.
See Also
A1
B1
A2
B2
MLPutMatrix
4-7
MLAutoStart
Purpose
Syntax
Description
Examples
Worksheet:
MLAutoStart("yes")
MLAutoStart("no")
Macro:
MLAutoStart "yes"
MLAutoStart "no"
"yes"
"no"
Sets automatic startup of Excel Link and MATLAB. When Excel Link
is installed, the default is yes. A change of state takes effect the next
time Excel is started.
MLAutoStart("no")
cancels automatic startup of Excel Link and MATLAB. The next time
Excel starts, Excel Link and MATLAB will not start.
See Also
4-8
MLClose
Purpose
Syntax
Worksheet:
MLClose()
Macro:
MLClose
Description
See Also
MLOpen
4-9
MLDeleteMatrix
Purpose
Syntax
Description
Example
Worksheet:
MLDeleteMatrix(var_name)
Macro:
MLDeleteMatrix var_name
var_name
4-10
MLEvalString
Purpose
Syntax
Description
Examples
Worksheet:
MLEvalString(command)
Macro:
MLEvalString command
command
divides the MATLAB variable b by 2 and plots it. Only the MATLAB
variable b is modified. To update data in the Excel worksheet, use
MLGetMatrix.
See Also
MLGetMatrix
4-11
MLGetFigure
Purpose
Syntax
Description
Worksheet:
MLGetFigure(width,height)
Macro:
width
height
Import the current MATLAB figure into Excel where the left-top corner
of the figure is the current spreadsheet cell.
If worksheet calculation mode is automatic, MLGetFigure executes
when you enter the formula in a cell. If worksheet calculation mode
is manual, enter the MLGetFigure function in a cell, then press F9 to
execute it. However, pressing F9 in this situation may also reexecute
other worksheet functions and generate unpredictable results.
If you use MLGetFigure in a macro subroutine, enter MatlabRequest
on the line after the MLGetFigure. MatlabRequest initializes internal
Excel Link variables and enables MLGetFigure to function in a
subroutine. Do not include MatlabRequest in a macro function unless
the function is called from a subroutine.
Examples
MLGetFigure(.50,.25)
imports the current MATLAB figure into Excel. The width of the figure
is half that of the original MATLAB figure and the height is quarter of
the original figure.
See Also
4-12
MLGetMatrix, MLGetVar
MLGetMatrix
Purpose
Syntax
Description
Worksheet:
MLGetMatrix(var_name, edat)
Macro:
var_name
edat
Caution
edat must not include the cell that contains the MLGetMatrix function.
In other words, be careful not to overwrite the function itself. Also make
sure there is enough room in the worksheet to write the matrix contents.
If there is insufficient room, the function generates a fatal error.
4-13
MLGetMatrix
If edat is an explicit cell address and you later insert or delete rows
or columns, or move or copy the function to another cell, edit edat
to correct the address. Excel Link does not automatically adjust cell
addresses in MLGetMatrix.
If worksheet calculation mode is automatic, MLGetMatrix executes
when you enter the formula in a cell. If worksheet calculation mode is
manual, enter the MLGetMatrix function in a cell, then press F9 to
execute it. However, pressing F9 in this situation may also reexecute
other worksheet functions and generate unpredictable results.
If you use MLGetMatrix in a macro subroutine, enter MatlabRequest
on the line after the MLGetMatrix. MatlabRequest initializes internal
Excel Link variables and enables MLGetMatrix to function in a
subroutine. Do not include MatlabRequest in a macro function unless
the function is called from a subroutine.
Examples
MLGetMatrix("bonds", "Sheet2!C10")
writes the contents of the MATLAB matrix bonds starting in cell C10 of
Sheet2. If bonds is a 4-by-3 matrix, data fills cells C10..E13.
MLGetMatrix(B12, B13)
4-14
MLGetMatrix
specify where to place the data. To do this using the range objects
Address property:
Sub Get_Variable()
MLGetMatrix "X", Cells(3, 2).Address
MatlabRequest
End Sub
See Also
MLAppendMatrix, MLPutMatrix
4-15
MLGetVar
Purpose
Syntax
Description
Examples
VBA_var_name
See Also
4-16
MLPutVar
MLMissingDataAsNaN
Purpose
Syntax
Worksheet:
MLMissingDataAsNaN("yes")
MLMissingDataAsNaN("no") (Default)
Macro:
MLMissingDataAsNaN "yes"
MLMissingDataAsNaN "no" (Default)
Description
"yes"
"no"
Sets empty cells to NaN or zero. When Excel Link is installed, the
default is "no" which means that empty cells are handled as 0s. If the
value of MLUseCellArray is changed to "yes", the change remains in
effect the next time Excel is started.
Note A string in an Excel range always forces cell array output and
empty cells as NaNs.
Examples
See Also
MLPutMatrix
4-17
MLOpen
Purpose
Syntax
Description
Worksheet:
MLOpen()
Macro:
MLOpen
Examples
MLOpen()
See Also
4-18
matlabinit, MLClose
MLPutMatrix
Purpose
Syntax
Description
Worksheet:
MLPutMatrix(var_name, mdat)
Macro:
var_name
mdat
If you have a named range in your worksheet, you can use the name
instead of actually specifying the range. For example:
4-19
MLPutMatrix
Sub test()
MLPutMatrix "a", Range("temp")
End Sub
Examples
MLPutMatrix("A", A1:C3)
See Also
4-20
MLAppendMatrix, MLGetMatrix
MLPutVar
Purpose
Syntax
Description
Create or overwrite MATLAB matrix with data from Excel VBA variable
VBA_var_name
Examples
Sub Put()
MLPutVar "K", DataK
End Sub
4-21
MLPutVar
See Also
4-22
MLGetVar
MLShowMatlabErrors
Purpose
Syntax
Worksheet:
MLShowMatlabErrors("yes")
MLShowMatlabErrors("no") (Default)
Macro:
MLShowMatlabErrors "yes"
MLShowMatlabErrors "no" (Default)
Description
Examples
"yes"
"no"
Sets the error display mode of Excel Link when executing MATLAB
commands using MLEvalString.
MLShowMatlabErrors("no")
See Also
MLEvalString
4-23
MLStartDir
Purpose
Syntax
Worksheet:
MLStartDir(path)
Macro:
MLStartDir path
path
Description
Sets the working directory for MATLAB after startup. Note this
function does not work like the standard Windows Start In setting in
that it will not automatically run any startup.m or matlabrc.m found
in the directory specified.
Examples
See Also
4-24
MLAutoStart
MLUseCellArray
Purpose
Syntax
Worksheet:
MLUseCellArray("yes")
MLUseCellArray ("no")
Macro:
MLUseCellArray "yes"
MLUseCellArray "no"
"yes"
"no"
Description
Examples
To cancel automatic use of cell arrays for easy transfer of data, enter
MLUseCellArray("no")
See Also
MLPutMatrix
4-25
MLUseFullDesktop
Purpose
Syntax
Worksheet:
MLUseFullDesktop("yes")
MLUseFullDesktop("no")
Macro:
MLUseFullDesktop "yes"
MLUseFullDesktop "no"
Description
Examples
"yes"
"no"
Sets MATLAB to start with the full desktop or Command window only.
When Excel Link is installed, the default is "yes".
MLUseFullDesktop("no")
See Also
4-26
A
Error Messages and
Troubleshooting
This appendix covers the following topics:
Excel Cell Error Messages (p. A-2)
A-2
Meaning
Solution
#COLS>#MAXCOLS!
#COMMAND!
#DIMENSION!
#INVALIDNAME!
#INVALIDTYPE!
#MATLAB?
Meaning
Solution
#NAME?
#NONEXIST!
#ROWS>#MAXROWS!
#SYNTAX?
#VALUE!
#VALUE!
A-3
Note When you open an Excel worksheet that contains Excel Link functions,
Excel tries to execute the functions from the bottom up and right to left, thus
possibly generating cell error messages (#COMMAND!, #NONEXIST!, etc.). Such
behavior is usual for Excel. Simply ignore the messages, close any MATLAB
figure windows, and reexecute the cell functions one at a time in the correct
order by pressing F2, then Enter.
A-4
Error Messages
Excel may display one of these error message boxes.
The first column of this table shows the error messages. The first three are
from Excel, and the last one is from the license manager.
The second column 2 indicates the type of error that caused the message
box to appear.
The third column proposes a solution for the error.
Excel Error Message Boxes
Excel Error Message Box
A-6
Meaning
Solution
Error Messages
Meaning
Solution
A-7
Meaning
Solution
.\matlab /regserver
4 When MATLAB starts, close it.
A-8
A-10
Data Errors
Data Errors
In this section...
Matrix Data Errors on page A-11
Errors When Opening Saved Worksheets on page A-11
Cause
Solution
MATLAB matrix is a
1-by-1 zero matrix.
MATLAB matrix is
empty ([ ]).
A-11
Such behavior is usual for Excel. Simply ignore the messages, close any
MATLAB figure windows, and reexecute the cell functions one at a time in
the correct order by pressing F2, and then Enter.
If you save an Excel worksheet containing Excel Link functions and later
open it under a different computer environment where the excllink.xla
add-in is in a different location, Excel may display a message box.
A-12