You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
RMVAR FILENAME VAR1 VAR2... removes the variables VAR1, VAR2... from the Mat-File FILENAME. If FILENAME has no extension RMVAR looks for FILENAME.mat
RMVAR('Filename','VAR1','VAR2' ...) does the same.
Example:
% Creates a file 'myfile.mat' containing 2 variables:
a='hello';
b=magic(3);
save myfile.mat a b
% Removes the variable 'a' and opens the result
clear
rmvar myfile a
load myfile
whos
Cite As
Frederic Moisy (2026). RMVAR Remove variables from MAT-File (https://www.mathworks.com/matlabcentral/fileexchange/19384-rmvar-remove-variables-from-mat-file), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (1.47 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
