File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 10
10
varnames (1 ,: ) string
11
11
end
12
12
13
- if startsWith(varnames , " /" )
14
- varnames = extractAfter(varnames , 1 );
15
- end
16
-
17
- vars = hdf5nc .h5variables(filename );
13
+ i = startsWith(varnames , " /" );
14
+ varnames(i ) = extractAfter(varnames(i ), 1 );
18
15
19
- exists = false(size(varnames ));
20
- for i = 1 : length(varnames )
21
- exists(i ) = any(vars == varnames(i ));
22
- end
16
+ exists = contains(varnames , hdf5nc .h5variables(filename ));
23
17
24
18
end % function
Original file line number Diff line number Diff line change 10
10
varnames (1 ,: ) string
11
11
end
12
12
13
- vars = hdf5nc .ncvariables(filename );
14
-
15
- exists = false(size(varnames ));
16
- for i = 1 : length(varnames )
17
- exists(i ) = any(vars == varnames(i ));
18
- end
13
+ exists = contains(varnames , hdf5nc .ncvariables(filename ));
19
14
20
15
end % function
You can’t perform that action at this time.
0 commit comments