rc = ddeadv(channel,item,callback,upmtx,format,timeout)
rc
The return code: 0 indicates the function call failed, 1 indicates it succeeded.
channel
ddeinit
.
item
item
at the server triggers the advisory link.
callback
item
at the server causes callback
to get passed to the eval
function to be evaluated.
upmtx
upmtx
is included, changing item
at the server causes upmtx
to be updated with the revised data.
upmtx
or specifying it as an empty string, creates a warm link. If upmtx
exists in the workspace, its contents get overwritten. If upmtx
does not exist, it is created.
format
timeout
timeout
is specified in milliseconds (1000 milliseconds = 1 second).
timeout
milliseconds, the function fails. The default value of timeout
is three seconds.
ddeadv
sets up an advisory link (described in the "DDE Advisory Links" section) between MATLAB and a server application.
When the data identified by the item
argument changes, the string specified by the callback
argument is passed to the eval
function and evaluated. If the advisory link is a hot link, DDE modifies upmtx
, the update matrix, to reflect the data in item
.
If item
corresponds to a range of data values, a change to any value in the range causes callback
to be evaluated.
% Set up a hot link between a range of cells in Excel
% and the matrix 'x'.
% If successful, display the matrix
rc = ddeadv(channel, 'r1c1:r5c5', 'disp(x)', 'x');
ddeexec,ddeinit
,ddepoke
,ddereq
,ddeterm
,ddeunadv
(c) Copyright 1994 by The MathWorks, Inc.