23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Deleting Timer Objects from Memory<br />

Deleting Timer Objects from Memory<br />

When you are finished with a timer object, delete it from memory using the<br />

delete function:<br />

delete(t)<br />

When you delete a timer object, workspace variables that referenced the object<br />

remain. Deleted timer objects are invalid and cannot be reused. Use the clear<br />

command to remove workspace variables that reference deleted timer objects.<br />

Testing the Validity of a Timer Object<br />

To test if a timer object has been deleted, use the isvalid function. The<br />

isvalid function returns logical 0 (false) for deleted timer objects:<br />

isvalid(t)<br />

ans =<br />

0<br />

Deleting All Existing Timer Objects<br />

To remove all timer objects from memory, enter<br />

delete(timerfind)<br />

For information about the timerfind function, see “Finding All Timer Objects<br />

in Memory” on page 10-24.<br />

10-23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!