When you no longer need an instrument object, you should disconnect it from the instrument, and clean up the MATLAB® workspace by removing the object from memory and from the workspace.
To disconnect your communication with the instrument, use the
You can examine the
Status property to
verify that the object and the instrument are disconnected.
ans = closed
fclose is issued, the resources associated
g are made available, and you can once again
connect an instrument object to the instrument with
To remove the instrument object from memory, use the
A deleted instrument object is invalid,
which means that you cannot connect it to the instrument. In this
case, you should remove the object from the MATLAB workspace.
To remove instrument objects and other variables from the MATLAB workspace,
If you use
clear on an object that is connected
to an instrument, the object is removed from the workspace but remains
connected to the instrument. You can restore cleared instrument objects
to the MATLAB workspace with the