You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://www.mathworks.com/matlabcentral/fileexchange/78673-matlab-hdf5)
[](https://github.com/geospace-code/matlab-hdf5/actions/workflows/ci_matlab.yml)
6
6
7
7
These HDF5 and NetCDF4 functions should be built into Matlab itself, but since they're not yet, we provide them.
8
8
@@ -24,65 +24,66 @@ runtests('hdf5nc')
24
24
25
25
### HDF5
26
26
27
-
Matlab R2020b uses HDF5 1.8.12.
27
+
Matlab R2021a uses HDF5 1.8.12.
28
28
29
29
```matlab
30
30
[major,minor,rel] = H5.get_libversion()
31
31
```
32
32
33
+
Check that a dataset exists in file:
33
34
34
-
* Check that a dataset exists in file:
35
-
36
-
```matlab
37
-
h5exists(filename, dataset_name)
38
-
```
35
+
```matlab
36
+
h5exists(filename, dataset_name)
37
+
```
39
38
40
-
* Save a variable to a dataset. If dataset exists, the existing dataset shape must match the variable.
39
+
Save a variable to a dataset.
40
+
If dataset exists, the existing dataset shape must match the variable.
41
41
42
-
```matlab
43
-
h5save(filename, dataset_name, dataset)
44
-
```
42
+
```matlab
43
+
h5save(filename, dataset_name, dataset)
44
+
```
45
45
46
-
* Get the dataset size (shape)
46
+
Get the dataset size (shape)
47
47
48
-
```matlab
49
-
h5size(filename, dataset_name)
50
-
```
48
+
```matlab
49
+
h5size(filename, dataset_name)
50
+
```
51
51
52
-
* Get the names of all datasets in a file
52
+
Get the names of all datasets in a file
53
53
54
-
```matlab
55
-
h5variables(filename)
56
-
```
54
+
```matlab
55
+
h5variables(filename)
56
+
```
57
57
58
58
### NetCDF4
59
59
60
-
Matlab R2020b uses NetCDF4 4.7.3.
60
+
Matlab R2021a uses NetCDF4 4.7.3.
61
61
62
62
```matlab
63
63
netcdf.inqLibVers
64
64
```
65
65
66
-
*Check that a variable exists in file:
66
+
Check that a variable exists in file:
67
67
68
-
```matlab
69
-
ncexists(filename, variable_name)
70
-
```
68
+
```matlab
69
+
ncexists(filename, variable_name)
70
+
```
71
71
72
-
* Save a variable to a dataset. If dataset exists, the existing dataset shape must match the variable.
72
+
Save a variable to a dataset.
73
+
If dataset exists, the existing dataset shape must match the variable.
0 commit comments