load2var
No License
LOAD2VAR loads a specific variable
from a mat file and returns it.
If no variable name is provided,
the first variable is chosen.
Made as an example for "loading mat-files!"
USAGE:
>> a=magic(3);
>> b='not me';
>> save('tmp');
>> clear all;
>> c=load2var('tmp','a')
c = 8 1 6
3 5 7
4 9 2
>> c=load2var('tmp','b')
c = not me
>> c=load2var('tmp')
c = 8 1 6
3 5 7
4 9 2
>> c=load2var('tmp','d')
c = []
IT'S NOT FANCY BUT IT WORKS
Cite As
Michael Robbins (2026). load2var (https://uk.mathworks.com/matlabcentral/fileexchange/6303-load2var), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
