Skip to content

Commit af0db0a

Browse files
committed
Vastly simplify ver checks
- Also fixes tests.
1 parent ef248f5 commit af0db0a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

+io/parseDataset.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131

3232
switch datatype.Class
3333
case 'H5T_STRING'
34-
versionNumber = getMatlabVersionNumber();
35-
assert(~isnan(versionNumber));
36-
if versionNumber < 9.8
34+
if verLessThan('MATLAB', '9.8')
3735
% MATLAB 2020a fixed string support for HDF5, making
3836
% reading strings "consistent" with regular use.
3937
data = data .';
@@ -84,9 +82,4 @@
8482
end
8583
H5D.close(did);
8684
H5F.close(fid);
87-
end
88-
89-
function versionNumber = getMatlabVersionNumber()
90-
VersionInfo = ver('MATLAB');
91-
versionNumber = str2double(VersionInfo.Version);
9285
end

0 commit comments

Comments
 (0)