ddepoke

Purpose

Send data from MATLAB to DDE server application.

Syntax

rc = ddepoke(channel,item,data,format,timeout)

Arguments

rc
The return code: 0 indicates the function call failed, 1 indicates it succeeded.
channel
The channel assigned to the conversation, returned by ddeinit.
item
A string that specifies the DDE item for the data sent. item is the server data entity that is to contain the data sent in the data argument.
data
A matrix that contains the data to be sent.
format
(optional) A scalar that specifies the Windows clipboard format of the data. MATLAB supports only Text format, which corresponds to a value of 1.
timeout
(optional) A scalar that specifies the time-out limit for this operation. timeout is specified in milliseconds (1000 milliseconds = 1 second). The default timeout is three seconds.

Description

ddepoke sends data to an application via an established DDE conversation. ddepoke formats the data matrix before sending it to the server application. String matrices are converted, element by element, to characters and the resulting character buffer is sent. Numeric matrices are sent as tab-delimited columns and carriage-return, line-feed delimited rows of numbers. Only the real part of non-sparse matrices are sent.

Example

% Send a 5x5 identity matrix to Excel
rc = ddepoke(channel, 'r1c1:r5c5', eye(5));

See Also

ddeexec, ddeinit, ddereq, ddeterm, ddeunadv, ddeadv

(c) Copyright 1994 by The MathWorks, Inc.