Remove instrument objects from MATLAB workspace
An instrument object or an array of instrument objects.
clear obj removes
the MATLAB® workspace.
This example creates the GPIB object
a new variable
gcopy, and clears
the MATLAB workspace.
g is then restored to
the workspace with
instrfind and is shown to be
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
connected to the instrument. You can restore
the workspace with the
An object connected to the instrument has a