MATLAB Answers

0

why does hdf5read function return only 4 decimal places instead all numbers

Asked by Nurul Ain on 28 Apr 2014
Latest activity Commented on by Nurul Ain on 28 Apr 2014
Hi all,
I run this code to read dataset in my test.hdf5 file. It return me 0.6996 instead of the whole 0.699552191362574. Please guide.
hinfo = hdf5info('test.hdf5');
dset = hdf5read(hinfo.GroupHierarchy.Datasets(1));
and here is my test.hdf5 file. test.hdf5

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Ashish Uthama on 28 Apr 2014
 Accepted Answer

Look at the documentation for format.
>> hinfo = hdf5info('test.hdf5');
dset = hdf5read(hinfo.GroupHierarchy.Datasets(1));
dset
dset =
0.6996
>> format long
>> dset
dset =
0.699552191362574
>>

  1 Comment

Thank you Ashish, it works for me!

Sign in to comment.