Code covered by the BSD License  

Highlights from
RMVAR Remove variables from MAT-File

1.0

1.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 1.47 KB File ID: #19384

RMVAR Remove variables from MAT-File

by Frederic Moisy

 

31 Mar 2008 (Updated 31 Mar 2008)

RMVAR is a simple program that removes specified variable(s) from a MAT-File

| Watch this File

File Information
Description

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

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
08 Sep 2008 luo guoping

if the mat is much huge,this routine demand huge memory.

18 Jun 2010 B

I tried to use this file to remove some redundant variables from a mat file that became to large to open (after adding vars with '-append').

However, this m-file apparently needs to load the complete m-file. A function that would be able to remove variables without having to load the complete data set would be of great interest.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path Frederic Moisy 22 Oct 2008 09:55:48
directories Frederic Moisy 22 Oct 2008 09:55:48
files Frederic Moisy 22 Oct 2008 09:55:48
remove variable Frederic Moisy 22 Oct 2008 09:55:48
matfile Frederic Moisy 22 Oct 2008 09:55:48
save Frederic Moisy 22 Oct 2008 09:55:48
load Frederic Moisy 22 Oct 2008 09:55:48
directories B 18 Jun 2010 06:39:39

Contact us at files@mathworks.com