How to put a String in a dataset attribute
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am currently using this code
dset = single(1);
dset_details.Location = '/metaData';
dset_details.Name = 'stringTest';
attr = 'char';
attr_details.Name = 'Pathtest';
attr_details.AttachedTo = '/metaData/stringTest';
attr_details.AttachType = 'dataset';
hdf5write('C:\withstrings.h5', dset_details, dset ...
, attr_details, attr, 'WriteMode', 'append' );
_____________________________________________________________________
But the problem is that I dont want numeric data but i want to as an example: 'C:\path' into the value.
What kind of datatype do i have to use? Because i have a program that automaticaly gives in the pathname. But when it saves into the h5 file it automatically gives the ASCII code from the path into the data but I don't want it to be ASCII Code i just want the full pathname to be in it as a string value.
No matter what type i use, a single, a double, it always converts into ASCII code, how can i save it to be just a string, just the pathname like: 'c:\path'
Can anyone help me with this?
Thanks.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu HDF5 finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!