Code covered by the BSD License  

Highlights from
loadFields from mat files

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 4.2 KB File ID: #30459

loadFields from mat files

by Arthur

 

18 Feb 2011

Loads a field from a number of mat files.

| Watch this File

File Information
Description

Sometime you need a specific field from a (large) number of mat files. With loadFields, the user can select all the mat files at once, and choose the required field using a pulldown menu. The values are returned as a single array if the field has always the same size, otherwise it returns a cell.

%USAGE:
%data = loadFields returns the values of a structure field
%from one or more files. User is prompted for the required field. If all
%struct fields contain a 1-by-n or n-by-1 matrix of the same size ,
%loadFields will create a single concatated array. In all other occasions,
%loadFields creates a cell with each field containing the field of a
%file.
%
%[data files] = loadFields returns the values of a structure
%field from one or more files, and files used.
%
%[data files fields] = loadFields returns the values of a strucure
%field, the files used, and the selected fields
%
% ... = loadFields(fields) returns the values of the structure fields
% in 'fields'

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Standalone Pulldown Menus

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data exploration Arthur 18 Feb 2011 15:26:51
data import Arthur 18 Feb 2011 15:26:51

Contact us at files@mathworks.com