Read delimited text file directly into a matlab structure with fields based on the header line text. Datatype for each field is determined by analyzing the first line of data. If datatype of a field changes then data for entire column is stored in a cell.
Enable quick input of data and easy access via the matlab structure.
[output_structure] = txt2struct(textfile, varargin)
mystruct = txt2struct('testdata.csv');
% Tim Ryan CSIRO 18 Dec 2007
% Gordon Keith CSIRO 12 Sep 2013
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.