Use GetData to Read a Dirfile into Matlab

A Matlab MEX binding for the gd_getdata() function in the GetData (getdata.sourceforge.net) project.
226 download
Aggiornato 12 giu 2012

Visualizza la licenza

The GetData project is the reference implementation for the dirfile file format. This format is used for scientific data, notably the Blast(-Pol) experiment, the BICEP2/Keck/Spider experiment, and others. I am aware of a Matlab mex file that allows dirfiles to be read into Matlab, but the file does not support interpolated fields (linterp). After a suggestion by Tom Montroy, I decided to write a short mex file that uses the native C functions in GetData to read the file, and use mex to pass that data quickly into Matlab.

Building this mex file requires linking to the GetData library. Instructions on how to do this are included in a pdf readme attached to this submission.

Once the code is compiled and linked, the function is used in Matlab as:

output_array = gd_getdata_mex('/filename/of/dirfile','field_name',100,75);

This would read 75 frames of data, starting at frame 100, of the field 'field_name' from the dirfile located in '/filename/of/dirfile'. You could then type plot(output_array) in Matlab and go from there with your analysis.

Cita come

Sean Bryan (2024). Use GetData to Read a Dirfile into Matlab (https://www.mathworks.com/matlabcentral/fileexchange/37101-use-getdata-to-read-a-dirfile-into-matlab), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2011b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

Added an improved readme with installation instructions.

1.0.0.0