External Interfaces Reference Previous page   Next Page
clear (serial)

Remove a serial port object from the MATLAB workspace

Syntax

Arguments

obj
A serial port object or an array of serial port objects.

Description

clear obj removes obj from the MATLAB workspace.

Remarks

If obj is connected to the device and it is cleared from the workspace, then obj remains connected to the device. You can restore obj to the workspace with the instrfind function. A serial port object connected to the device has a Status property value of open.

To disconnect obj from the device, use the fclose function. To remove obj from memory, use the delete function. You should remove invalid serial port objects from the workspace with clear.

Example

This example creates the serial port object s, copies s to a new variable scopy, and clears s from the MATLAB workspace. s is then restored to the workspace with instrfind and is shown to be identical to scopy.

See Also

Functions

delete, fclose, instrfind, isvalid

Properties

Status


Previous page  Serial Port I/O Functions delete (serial) Next page

© 1994-2005 The MathWorks, Inc.