image thumbnail

EasyH5

版本0.8.1(39.1 KB) Qianqian Fang
MATLAB的易于使用的HDF5数据接口(LOADH5和SAVEH5)

262下载

Updated2022年5月18日

From GitHub

在GitHub上查看许可证

= EasyH5 Toolbox - An easy-to-use HDF5 data interface (loadh5 and saveh5) =

*版权(c)2019 Qianqian fang
*许可证:GNU通用公共许可证版本3(GPL V3)或3条规定BSD许可证,请参阅许可证* .txt
* Version: 0.8 (code name: Go - Japanese 5)
* URL:http://github.com/fangq/easyh5

==概述==

EasyH5是一个全自动,快速,紧凑和便携式MATLAB对象到HDF5
出口商/进口商。它包含两个易于使用的功能-`loadh5.m`和
`saveh5.m`。`saveh5.m`可以处理几乎所有MATLAB数据类型,包括
structs, struct arrays, cells, cell arrays, real and complex arrays, strings,
和`containser.map`对象。所有其他数据类(例如表格,Digraph,
等)也可以使用无证件数据序列化来存储/加载
interface (MATLAB only).

EasyH5使用特殊复合数据类型存储复杂的数值数组
HDF5数据集。数据的真实部分被存储为“真实”和虚构
部分存储为“图像”组件。`loadh5.m`自动转换
这样的数据结构到复杂的数组。从v0.8开始,EasyH5也支持万博1manbetx
使用2或3的复合数据集保存和加载稀疏阵列
专业子场:`sparsearray',``real'',而在稀疏的情况下
复杂的数组,`imag'。稀疏阵列维度被存储为属性
名为“ SparsearRaysize”,附有数据集。使用`deflate`滤波器
to save compressed arrays is supported in v0.8 and later.

Because HDF5 does not directly support 1-D/N-D cell arrays or struct arrays,
EasyH5将这些数据结构转换为具有名称的数据组
following format
````````
['/hdf5/path/.../varname',num2str(idx1d)]
````````
where `varname` is the variable/field name to the cell/struct array object,
和`iDx1d`是单元格/结构数组的1-D整数索引。我们也提供
一个函数`regrouph5.m`以自动折叠这些组/数据集名称
使用`loadH5.m`加载数据后进入1-D单元/结构阵列。见示例
以下。

==安装==

The EasyH5 toolbox can be installed using a single command
````````
addpath('/path/to/easyh5');
````````
where the `/path/to/easyh5` should be replaced by the unzipped folder
工具箱(即包含`loadH5.m/saveh5.m`的文件夹)。

==用法==

===`saveh5`-将MATLAB struct(array)或单元格(数组)保存到HDF5文件中
Save a MATLAB struct (array) or cell (array) into an HDF5 file.

Example:
````````
a = struct('a',rand(5),'c','string','b',true,'d',2+3i,'e',{'test',[],1:5});
saveh5(a,'test.h5');
saveh5(a(1),'test2.h5','rootname','');
saveh5(a(1),'test2.h5','compression','deflate','compressarraysize',1);
````````
=== `loadh5` - Load data in an HDF5 file to a MATLAB structure.
将数据加载到HDF5文件中到MATLAB结构。

Example:
````````
a = {rand(2),struct('va',1,'vb','string'),1+2i};
saveh5(a,'test.h5');
a2 = loadh5('test.h5')
a3 = loadh5('test.h5','regroup',1)
iSequaln(a,a3.a)
a4=loadh5('test.h5','/a1')
````````
=== `regrouph5` - Processing an HDF5 based data and group indexed datasets into a cell array
处理LOADH5恢复数据并合并“索引数据集”
names start with an ASCII string followed by a contiguous integer
序列号从1开始,到一个单元格数组。例如,
数据集{data.a1,data.a2,data.a3}将合并到单元/结构中
array data.a with 3 elements.

Example:
````````
a = struct('a1',rand(5),'a2','string','a3',true,'d',2+3i,'e',{'test',[],[],1:5});
a(1).A1 = 0;a(2).a2 ='test';
data = regrouph5(a)
saveh5(a,'test.h5');
rawdata = loadh5('test.h5')
data=regrouph5(rawdata)
````````

==已知问题

- EasyH5 currently does not support 2D cell and struct arrays
- 如果单元格名称以一个数字结束,例如`a10 = {...}`;`regrouph5`不能正确分组
- If a database/group name is longer than 63 characters, it may have the risk of being truncated

== Contribute to EasyH5 ==

请在GitHub问题页面上提交错误报告,功能请求和问题

https://github.com/fangq/easyh5/issues

请随时订购我们的软件,进行更改并提交您的修订
to us via "Pull Requests". EasyH5 is open-source and we welcome your contributions!

徽标字体:
https://fonts.google.com/specimen/Plaster?selection.family=Plaster

引用为

Qianqian Fang(2022)。EasyH5(https://github.com/fangq/easyh5),github。检索

MATLABRelease Compatibility
使用R2010A创建
Compatible with any release
平台兼容性
Windows macOS Linux
致谢

启发:HDF5data to struct reader

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!
To view or report issues in this GitHub add-on, visit theGitHub存储库
To view or report issues in this GitHub add-on, visit theGitHub存储库