| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
As an alternative to the delete function, use the Current Folder browser.
delete(fileName1, filename2, ...)
delete(h)
delete(handle_array)
delete fileName
delete(fileName1, filename2, ...) deletes the files fileName1, fileName2, and so on, from the disk. fileName is a string and can be an absolute path or a path relative to the current folder. fileName also can include wildcards (*). Delete multiple files by appending their file names, separated by spaces.
delete(h) deletes the graphics object with handle h. The function deletes the object without requesting verification, even if the object is a window. Delete multiple objects by appending their handles as additional arguments, separated by commas.
delete(handle_array) is a method of the handle class. It removes from memory the handle objects referenced by handle_array.
When deleted, any references to the objects in handle_array become invalid. To remove the handle variables, use the clear function.
delete fileName is the command syntax.
The MATLAB software does not ask for confirmation when you use delete. To avoid accidentally losing files or graphics objects, make sure to specify accurately the items to delete. To move files to a different location when running delete, use the General preference for Deleting files, or the recycle function.
The delete function deletes files and handles to graphics objects only. To delete folders, use rmdir.
Delete all files with a .mat extension in the ../mytests/ folder:
delete('../mytests/*.mat')![]() | delaunayn | delete (COM) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |