diff --git a/+types/+untyped/@DataStub/load_mat_style.m b/+types/+untyped/@DataStub/load_mat_style.m index 6b4545f6..f32312c0 100644 --- a/+types/+untyped/@DataStub/load_mat_style.m +++ b/+types/+untyped/@DataStub/load_mat_style.m @@ -48,18 +48,14 @@ points = cell(length(dataDimensions), 1); if isscalar(dataDimensions) - if isMATLABReleaseOlderThanR2024b() - % Pass. Scalar size input to ind2sub was supported until R2024b. - else - % Starting in MATLAB R2024b, the input argument for the size - % of an array in ind2sub must be a vector of positive integers - % with two or more elements. This fix replicates the behavior of - % older MATLAB versions, where it was assumed that the a scalar - % size referred to the row dimension. For scalar dimensions - % (i.e., row or column vectors), we can still assume this - % to be true in matnwb. - dataDimensions = [dataDimensions, 1]; - end + % Starting in MATLAB R2024b, the input argument for the size + % of an array in ind2sub must be a vector of positive integers + % with two or more elements. This fix replicates the behavior of + % older MATLAB versions, where it was assumed that the a scalar + % size referred to the row dimension. For scalar dimensions + % (i.e., row or column vectors), we can still assume this + % to be true in matnwb. + dataDimensions = [dataDimensions, 1]; end [points{:}] = ind2sub(dataDimensions, orderedSelection); @@ -204,11 +200,3 @@ indexKeyIndex((indexKeyIndexNextIndex+1):end) = 1; end end - -function tf = isMATLABReleaseOlderThanR2024b() - if exist('isMATLABReleaseOlderThan', 'file') == 2 - tf = isMATLABReleaseOlderThan('R2024b'); - else - tf = true; % isMATLABReleaseOlderThan was introduced in R2020b - end -end \ No newline at end of file