External Interfaces Reference Previous page   Next Page
isvalid

Determine if serial port objects are valid

Syntax

Arguments

obj
A serial port object or array of serial port objects.
out
A logical array.

Description

out = isvalid(obj) returns the logical array out, which contains a 0 where the elements of obj are invalid serial port objects and a 1 where the elements of obj are valid serial port objects.

Remarks

obj becomes invalid after it is removed from memory with the delete function. Because you cannot connect an invalid serial port object to the device, you should remove it from the workspace with the clear command.

Example

Suppose you create the following two serial port objects.

s2 becomes invalid after it is deleted.

isvalid verifies that s1 is valid and s2 is invalid.

See Also

Functions

clear, delete


Previous page  instrfind length (serial) Next page

© 1994-2005 The MathWorks, Inc.