- •Is the same as the previous syntax, but accepts attribute value pairs,
- •Xlsfinfo Determine if file contains Microsoft Excel spreadsheet.
- •Internet resource
- •Is a string. Message is either a string or a cell array. If it is a
- •Variables and the Windows registry.
- •Zip file access
- •Individual file can be specified relative to the current directory or
- •Tar file access
- •Individual file can be specified relative to the current directory or
- •Gzip file access
- •Individual file can be specified relative to the current directory or
- •Formatted file I/o
- •Icinterface/fgets
- •If %s is used an element read may cause several matlab matrix
- •Integer NaN as zero.
- •If true, textscan treats
- •File opening and closing
- •It on the matlab search path. On unix systems, filename may also start
- •Binary file I/o
- •If the most recent I/o operation was successful, message is empty
- •Indicator in the specified file. Position is indicated in bytes
- •Memory-mapped file support
- •Is correct for platform it's executed on.
- •Is also a valid partial pathname.
- •Serial port support
- •Instrfind will not find an object with a Name property value of
- •Instrfind will not find an object with a Name property value of
- •Timer support
- •Visible timer objects whose property names and property values match
- •Command window I/o
- •In the current directory. The folder contains an m-file for each web service
Serial port support
<serial> - Construct serial port object.
SERIAL Construct serial port object.
S = SERIAL('PORT') constructs a serial port object associated with
port, PORT. If PORT does not exist or is in use you will not be able
to connect the serial port object to the device.
In order to communicate with the device, the object must be connected
to the serial port with the FOPEN function.
When the serial port object is constructed, the object's Status property
is closed. Once the object is connected to the serial port with the
FOPEN function, the Status property is configured to open. Only one serial
port object may be connected to a serial port at a time.
S = SERIAL('PORT','P1',V1,'P2',V2,...) constructs a serial port object
associated with port, PORT, and with the specified property values. If
an invalid property name or property value is specified the object will
not be created.
Note that the property value pairs can be in any format supported by
the SET function, i.e., param-value string pairs, structures, and
param-value cell array pairs.
Example:
% To construct a serial port object:
s1 = serial('COM1');
s2 = serial('COM2', 'BaudRate', 1200);
% To connect the serial port object to the serial port:
fopen(s1)
fopen(s2)
% To query the device.
fprintf(s1, '*IDN?');
idn = fscanf(s1);
% To disconnect the serial port object from the serial port.
fclose(s1);
fclose(s2);
See also serial/fopen.
Reference page in Help browser
doc serial
<instrfindall> - Find all serial port objects with specified property values.
INSTRFINDALL Find all serial port objects with specified property values.
OUT = INSTRFINDALL returns all serial port objects that exist in memory
regardless of the object's ObjectVisibility property value. The serial
port objects are returned as an array to OUT.
OUT = INSTRFINDALL('P1', V1, 'P2', V2,...) returns an array, OUT, of
serial port objects whose property names and property values match
those passed as param-value pairs, P1, V1, P2, V2,... The param-value
pairs can be specified as a cell array.
OUT = INSTRFINDALL(S) returns an array, OUT, of serial port objects whose
property values match those defined in structure S whose field names
are serial port object property names and the field values are the
requested property values.
OUT = INSTRFINDALL(OBJ, 'P1', V1, 'P2', V2,...) restricts the search for
matching param-value pairs to the serial port objects listed in OBJ.
OBJ can be an array of serial port objects.
Note that it is permissible to use param-value string pairs, structures,
and param-value cell array pairs in the same call to INSTRFIND.
When a property value is specified, it must use the same format as
GET returns. For example, if GET returns the Name as 'MyObject',