JimHokanson / matlab_standard_library

Standard Library for my Matlab Projects
MIT License
7 stars 10 forks source link

Create delimited read object #11

Closed JimHokanson closed 7 years ago

JimHokanson commented 10 years ago

sl.io.readDelimitedFile currently returns raw data and 'extras'

It would be nice to return an object instead of raw data. This object would help with getting the data in the format that is desired. For example, one could grab multiple numeric columns and easily have them converted to fields in a structure without having to do the conversion of the raw code directly (i.e. use a method of the returned object).

This really came to mind when column entries actually started representing arrays and then I needed to do some not so pretty parsing of the values. Instead, implement this as a method of the returned object.

To maintain backward compatibility we'll make the output dependent upon passing in an additional 'return' parameter that has a value of 'object'. This will indicate that the user desires to use the new functionality.

The list of desired features isn't completely known but should contain the "extras" plus some parsing options.

For usage see: dba.GSK.cmg_expt