23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2ddereq<br />

Purpose <strong>Request</strong> data from application<br />

Syntax data = ddereq(channel,'item')<br />

data = ddereq(channel,'item',format)<br />

data = ddereq(channel,'item',format,timeout)<br />

Description ddereq requests data from a server application via an established DDE<br />

conversation. ddereq returns a matrix containing the requested data or an<br />

empty matrix if the function is unsuccessful.<br />

Arguments<br />

ddereq<br />

If you omit optional arguments that are not at the end of the argument list, you<br />

must substitute the empty matrix for the missing argument(s).<br />

If successful, ddereq returns a matrix containing the requested data in<br />

variable, data. Otherwise, it returns an empty matrix.<br />

channel Conversation channel from ddeinit.<br />

item String specifying the server application's DDE item name for<br />

the data requested.<br />

format<br />

(optional)<br />

timeout<br />

(optional)<br />

Two-element array specifying the format of the data requested.<br />

The first element specifies the Windows clipboard format to<br />

use. The only currently supported format is cf_text, which<br />

corresponds to a value of 1. The second element specifies the<br />

type of the resultant matrix. Valid types are numeric (the<br />

default, which corresponds to 0) and string (which<br />

corresponds to a value of 1). The default format array is [1 0].<br />

Scalar specifying the time-out limit for this operation. timeout<br />

is specified in milliseconds. (1000 milliseconds = 1 second). The<br />

default value of timeout is three seconds.<br />

Examples Assume that we have an Excel spreadsheet stocks.xls. This spreadsheet<br />

contains the prices of three stocks in row 3 (columns 1 through 3) and the<br />

number of shares of these stocks in rows 6 through 8 (column 2). Initiate<br />

conversation with Excel with the command:<br />

channel = ddeinit('excel','stocks.xls')<br />

2-401

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!