Removes a variable from a MAT-file
Updated 12 Dec 2011

View License

delvarmat Delete variable(s) from MAT-file
STATUS = delvarmat(FILENAME,VARIABLE1,...) deletes the
variable(s) from the MAT-file.

STATUS = delvarmat(VARIABLE1,...) deletes the variable(s) from

delvarmat returns 1(failure) if either the MAT-file doesn't exist in
the current directory or if anyone of the listed variables don't
exist in the MAT-file. delvarmat returns 0(success) otherwise.

Note: If delvarmat can not find a particular variable in a MAT-file,
even though it will return an error status, any variables already
deleted will stay removed from the MAT-file.

Because the File Exchange doesn't allow for MEX-files, the C-code is included here to compile the code

>> mcc delvarmat.c

Supplied with an accompanying M-file for the HELP entry.

Cite As

Raymond Norris (2024). delvarmat (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Variables in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Minor update.