Delete files or objects
delete('fileName1', 'filename2', ...)
delete('fileName1', 'filename2', ...) deletes
and so on, from the disk.
fileName is a string
and can be an absolute path or a path relative to the current folder.
can include wildcards (
delete fileName is the command
syntax. Delete multiple files by appending filenames, separated by
spaces. When filenames contain space characters, you must use the
delete(h) deletes the graphics
h an array, the
function deletes all objects in the array.
also contain the figure
The function deletes objects without requesting verification, even if when the objects are figure windows.
delete(handle_array) is a method of the
handle class. It removes
from memory the handle objects referenced by
When deleted, any references to the objects in
invalid. To remove the handle variables, use the
delete does not ask for confirmation,
to avoid accidentally losing files or graphics objects, be sure to
specify accurately the items to delete. To move
files to a different location when running
use the General preference for Deleting
files, or the
delete function deletes files and graphics
objects only. To delete folders, use
Delete all files with a
.mat extension in
Create a figure and an axes, and then delete the axes:
fig = figure; ax = axes; ... delete(ax)
axremains in the workspace, but no longer refers to an object.
Use an array to delete all the line objects created by
H = plot(magic(5));
Pass the array