Skip to content

Commit

Permalink
update examples, add known problems
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 30, 2019
1 parent ef907c6 commit 96e6396
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Major updates are marked with a "*"

== EazyH5 v0.8 (Go), FangQ <q.fang (a) neu.edu> ==
== EazyH5 v0.8 (Go - Japanese 5), FangQ <q.fang (a) neu.edu> ==

2019-09-30*[104a9ed] add regroup option for loadh5, change regexp, add demo
2019-09-30*[bb762a8] support saving and restoring non-ascii group and dataset names, like JSONLab
Expand All @@ -16,7 +16,7 @@ Major updates are marked with a "*"
2019-09-22 [289d2b6] update readme
2019-09-22*[b09c80f] now reading data in creation order, fix #1, also reads specified node using rootpath

== EazyH5 v0.5 (Cinco), FangQ <q.fang (a) neu.edu> ==
== EazyH5 v0.5 (Cinco - Spanish 5), FangQ <q.fang (a) neu.edu> ==

2019-09-19 [dc62ed5] update code name and version number
2019-09-19 [66de6e2] tracking creation order, need to use links to read in loadh5
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Copyright (C) 2019 Qianqian Fang <q.fang at neu.edu>
* License: GNU General Public License version 3 (GPL v3) or 3-clause BSD license, see LICENSE*.txt
* Version: 0.8 (code name: Go)
* Version: 0.8 (code name: Go - Japanese 5)
* URL: http://github.com/fangq/eazyh5

## Overview
Expand Down Expand Up @@ -63,8 +63,12 @@ Load data in an HDF5 file to a MATLAB structure.

Example:
```
data=loadh5('test.h5');
subdata=loadh5('test.h5','/a1')
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
Processing a loadh5 restored data and merge "indexed datasets", whose
Expand All @@ -83,6 +87,11 @@ Example:
data=regrouph5(rawdata)
```

## Known problems
- EazyH5 currently does not support 2D cell and struct arrays
- If a cell name ends with a number, such as `a10={...}`; `regrouph5` can not group the cell correctly
- If a database/group name is longer than 63 characters, it may have the risk of being truncated

## Contribute to EazyH5

Please submit your bug reports, feature requests and questions to the Github Issues page at
Expand Down
9 changes: 4 additions & 5 deletions loadh5.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,22 @@
% a2=loadh5('test.h5')
% a3=loadh5('test.h5','regroup',1)
% isequaln(a,a3.a)
% a4=loadh5('test.h5','/a1')
%
% This function was adapted from h5load.m by Pauli Virtanen <pav at iki.fi>
% This file is part of EazyH5 Toolbox: https://github.com/fangq/eazyh5
%
% License: GPLv3 or 3-clause BSD license, see https://github.com/fangq/eazyh5 for details
%

path = '';
if(bitand(length(varargin),1)==0)
opt=varargin2struct(varargin{:});
path='';
elseif(length(varargin)>=3)
path=varargin{1};
opt=varargin2struct(varargin{2:end});
end

if nargin <= 1
path = '';
elseif(length(varargin)==1)
path=varargin{1};
end

if(isa(filename,'H5ML.id'))
Expand Down

0 comments on commit 96e6396

Please sign in to comment.