View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.9 KB File ID: #33447 Version: 1.6




26 Oct 2011 (Updated )

Allows user to define the name of unknown variable from .mat file and load it into the workspace.

| Watch this File

File Information

getfilevar is an alternative to load. It accepts the name of a .mat file, identifies the variables in the file and allows the user to choose a single variable to load. This avoids use of the convention struct=load(filename,variable), which requires the user to know the name of the variable in subsequent lines of code. getfilevar allows the user to define the variable name before loading and allows for some degree of 'blind' coding.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
26 Oct 2011 1.1

Now includes output of original variable name and the option to define the prompt for the list dialogue.

28 Oct 2011 1.2

getfilevar can now be called with no input arguments, allowing the user to select a file interactively from a file browser.

28 Oct 2011 1.3

Bugfix: uigetfile in previous issue did not pass complete file path to filename.

31 Oct 2011 1.5

Update to deal with list size falling off the edge of the screen.

01 Nov 2011 1.6

Bugfix - filename now loading properly for all input options.

Contact us