How to put a String in a dataset attribute
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 HDF5 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!