Accesing data in h5 file structure

조회 수: 2 (최근 30일)
Luis Eduardo Cofré Lizama
Luis Eduardo Cofré Lizama 2020년 9월 14일
댓글: Luis Eduardo Cofré Lizama 2020년 9월 14일
Dear All, I am trying to access data in a .h5 file, which is in a structure. At a certain level I want to access the data by selecting a sensor based on its number (see image below). For example I want to select Name '/Sensors/6814', how could acces it by creating a sting or so?
Cheers
Eduardo

채택된 답변

Walter Roberson
Walter Roberson 2020년 9월 14일
names = {hinfo.GroupHierarchy.Groups(2).Groups.Name};
[found, idx] = ismember('/Sensors/6814', names);
if found
g = hinfo.GroupHierarchy.Groups(2).Groups(idx);
else
g = [];
end
  댓글 수: 1
Luis Eduardo Cofré Lizama
Luis Eduardo Cofré Lizama 2020년 9월 14일
Thanks for the quick reply. It worked!.
cheers!
eduardo

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by