File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 6
6
clear all ;
7
7
8
8
%% File operations
9
- path = ' module2 .h5' ;
9
+ path = ' tests/test .h5' ;
10
10
11
11
% Open NIX file
12
12
f = nix .File(path , nix .FileMode .ReadOnly );
40
40
% get DataArrays by several criteria
41
41
cond1 = @(x ) ~isempty(strfind(x .name , ' SpikeActivity' ));
42
42
cond2 = @(x ) any(cellfun(@(y ) strcmp(y .name , ' Unit 7' ), x .sources ));
43
- cond3 = @(x ) x .open_metadata .properties_map(' Target' ) == 2 ;
44
- cond4 = @(x ) x .open_metadata .properties_map(' BehavioralCondition' ) == 3 ;
45
- idx = cellfun(@(x ) cond1(x ) & cond2(x ) & cond3(x ) & cond4(x ), b .dataArrays );
43
+ idx = cellfun(@(x ) cond1(x ) & cond2(x ), b .dataArrays );
46
44
selection2 = b .dataArrays(idx );
47
45
48
46
% get actual data
51
49
52
50
% understand dimensions
53
51
dim1 = d1.dimensions{1 };
54
- dim1 .type
52
+ dim1 .dimensionType
55
53
dim1 .unit
56
54
57
55
% plot data
67
65
sec = f.sections{2 }.sections{1 };
68
66
69
67
% display all Section properties
70
- cellfun(@(x ) disp(x ), sec .properties_cell );
68
+ cellfun(@(x ) disp(x ), sec .allProperties );
71
69
72
70
% get a certain Value by index
73
- value = sec.properties_cell {1 }.values{1 };
71
+ value = sec.allProperties {1 }.values{1 };
74
72
75
73
% or by name
76
- value = sec .properties_map (' Name' );
74
+ value = sec .open_property (' Name' ).values{ 1 }.value ;
77
75
78
- %% clear space
79
- clear all ;
You can’t perform that action at this time.
0 commit comments