Delete files or objects
delete filename1 ... filenameN
disk, without requesting verification. To change whether the specified
file is permanently deleted or sent to the recycle bin, change the Delete
files preference. To do so, go to the Home tab
and in the Environment section, click Preferences.
Select MATLAB > General and choose from one of the two options in the Delete
Note: On Mac platforms, the Delete files preference is not applied to files deleted from network drives.
Delete all files in the current folder with a
Delete a graphics object and graphics object array.
Create a figure and an axes, and then delete the axes. The axes is deleted, but the figure remains. The axes variable
ax remains in the workspace, but no longer refers to an object.
fig = figure; ax = axes; delete(ax) display(ax)
ax = handle to deleted Axes
Delete all the line objects created by plot.
H = plot(magic(5)); delete(H)
filename— Name of file to delete
Name of file to delete, specified as a character vector.
be an absolute or relative path and can include wildcards (*).
h— Object to delete
Object to delete, specified as an object or an object array.