|MATLAB Function Reference|
Remove a serial port object from the MATLAB workspace
||A serial port object or an array of serial port objects.
obj from the MATLAB workspace.
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
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
If you use the
help command to display help for
clear, then you need to supply the pathname shown below.
This example creates the serial port object
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