Remove instrument objects from MATLAB workspace
An instrument object or an array of instrument objects.
clear obj removes
from the MATLAB® workspace.
This example creates the GPIB object
g to a new variable
gcopy, and clears
g from the MATLAB workspace.
g is then restored to the workspace with
instrfind and is shown to be identical to
g = gpib('ni',0,1); gcopy = g; clear g g = instrfind; isequal(gcopy,g) ans = 1
obj is connected to the instrument and it is cleared from
the workspace, then
obj remains connected to the instrument. You
obj to the workspace with the
instrfind function. An object
connected to the instrument has a
Status property value of