Write a string to hdf5 file with defined string length
Mostrar comentarios más antiguos
I am trying to write a string to hdf5 file:
h5create('combo.hdf5','/description',1,Datatype='string');
h5write('combo.hdf5','/description',"this is the description");
When I read it out using h5disp, the result is:
Dataset 'description'
Size: 1
MaxSize: 1
Datatype: H5T_STRING
String Length: variable
Padding: H5T_STR_NULLTERM
Character Set: H5T_CSET_UTF8
Character Type: H5T_C_S1
ChunkSize: []
Filters: none
FillValue: ''
Notice the String Length is denoted as 'variable'. What if I want to define the length of this string (23 here), so it shows:
String Length: 23
Thank you very much!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre HDF5 Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!