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.
Sam Roberson (2021). getfilevar (https://www.mathworks.com/matlabcentral/fileexchange/33447-getfilevar), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!