A FORTRAN/C++ program uses an input file with extension *.h5. I want to change the contents of one array in this h5 file to single precision and re-run the FORTRAN/C++ program. I've taken the following steps in MATLAB/Octave:
The FORTRAN/C++ program crashes when looking for the data in the data.h5 produced by MATLAB in this way. I came to find that p=load('data.h5') does not store the data in p.second.values, but in p.p.second.values.
I just want the h5 file read by the FORTRAN/C++ program to be the exact same as before, except with second.values to be an array of single-precision numbers rather than double. Is there an easy way?