필터 지우기
필터 지우기

Reading HDF5 with dynamic filters

조회 수: 31 (최근 30일)
Ben Dichter
Ben Dichter 2022년 3월 20일
답변: Ninad 2024년 1월 19일
I am trying to read an HDF5 file that uses a zstd filter, and I am having trouble setting the HDF5_PLUGIN_PATH variable. Here is what I have tried:
>> !export HDF5_PLUGIN_PATH=/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins
>> !echo $HDF5_PLUGIN_PATH
/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins
>> setenv("HDF5_PLUGIN_PATH", "/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins")
>> getenv("HDF5_PLUGIN_PATH")
'/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins'
>> h5read("zstd.h5","/data")
Error using h5readc
The HDF5 library encountered an error and produced the following stack trace information:
H5PL__find_plugin_in_path can't open directory: /usr/local/hdf5/lib/plugin
Error in h5read (line 93)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
Why is MATLAB looking in /usr/local/hdf5/lib/plugin? That directory does not exist, and I have tried two different ways to tell MATLAB to look an a different directory. What am I doing wrong?
  댓글 수: 4
Ben Dichter
Ben Dichter 2022년 3월 23일
@Benjamin Thompson so do you have any ideas how I might fix this? I am not trying to read a .mat file
Science Machine
Science Machine 2023년 4월 18일
try loading path before starting matlab?

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

답변 (1개)

Ninad
Ninad 2024년 1월 19일
Hi Ben,
As per my understanding you want to read an HDF5 file in MATLAB and you are unable to set HDF5_PLUGIN_PATH variable using the "setenv()" function.
Please go through the latest version of MATLAB documentation "Import HDF5 Files":
It clearly states that you need to set the HDF5_PLUGIN_PATH environment variable to the folder containing the installed plugin binary file before you start MATLAB.
On Windows® — Set the environment variable using System Properties > Advanced > Environment Variables, and then start MATLAB.
Hope this helps.
Regards
Ninad

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by