Effacer les filtres
Effacer les filtres

Retrieve information from a .h5 file

3 vues (au cours des 30 derniers jours)
Tala
Tala le 20 Mar 2024
Commenté : Tala le 20 Mar 2024
Hello,
During an experiment, the data acquisition system unexpectedly failed, resulting in a *.h5 file instead of the usual *.mat file for heat flux data. I'm seeking assistance to retrieve the data, even if it's only partial, from this file. I used commands like:
data = h5read("Data.h5")
but I cannot see anything meaningful (attached photo).
Any help would be greatly appreciated.
Thank you.
  4 commentaires
Walter Roberson
Walter Roberson le 20 Mar 2024
I don't want too say that there is definitely no way to get data out of it. I can see some structure, and possibly data could be retrieved through appropriate fseek() and binary reads. But it would not be easy.
Tala
Tala le 20 Mar 2024
I apreciate your input as always

Connectez-vous pour commenter.

Réponses (1)

Aditya
Aditya le 20 Mar 2024
Hi Tala,
I understand that you're facing issues retrieving meaningful data from an unexpected '.h5 file' instead of the usual '.mat file' for your heat flux data. Since I can't directly open files or access links, let's try a general approach to help you navigate through this.
First, ensure you're familiar with the structure of your '.h5 file' by using:
info = h5info('Data.h5');
disp(info);
This will give you an overview, helping you identify the correct dataset path to use.
Then, to read data from a specific dataset within your '.h5 file', use:
data = h5read('Data.h5', '/your_dataset_path_here');
Make sure to replace '/your_dataset_path_here' with the actual path to your dataset, which you can find from the info structure.
If the data still doesn't seem meaningful, it might be due to complex structures or specific attributes within the dataset. In such cases, further processing or reading of attributes using 'h5readatt' might be necessary.
For more detailed analysis or if you're still facing issues, consider attaching the file directly in your post, if possible, for community support.
For more information on 'h5info' and 'h5readatt' function, refer to the below MATLAB documentation:
Hope this helps!

Catégories

En savoir plus sur Standard File Formats dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by