3.0

3.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 1.82 KB File ID: #24091

HDF5 Read/Write Cellstr Example

by Jason Kaeding

 

12 May 2009

Demonstrates writing MATLAB cell arrays of strings as variable-length strings to HDF5 files.

| Watch this File

File Information
Description

Demonstrates how to write/read MATLAB cell arrays of strings as variable-length strings to/from HDF5 files. Example also demonstrates how to set up an unlimited-length dataset with chunking so that it could handle any number of elements in the cell array.

I didn't see any evidence of anyone doing this yet. I think any HDF5/MATLAB users have settled on using char arrays instead, which wastes space. Even the built-in hdf5write converts a cellstr to char array.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
21 Apr 2011 LP

Nice Solution.

Can be generalized to n x p cellstr if one requires, in its current form the code must be a n x 1 cellstr.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
hdf Jason Kaeding 12 May 2009 13:35:26
hdf5 Jason Kaeding 12 May 2009 13:35:28
data import Jason Kaeding 12 May 2009 13:35:28
data export Jason Kaeding 12 May 2009 13:35:28
data export foxkingdom 02 Nov 2011 08:58:00

Contact us at files@mathworks.com