Write a string to hdf5 file with defined string length
Ältere Kommentare anzeigen
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!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu HDF5 Files finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!