MaxvandenBoom / matmef

Matlab wrapper for MEF library
GNU General Public License v3.0
1 stars 3 forks source link

error line 142 readMef3 #5

Closed dorahermes closed 2 years ago

dorahermes commented 2 years ago

I got an error in line 142 of readMef3 that seems to be related to loading ranges, with the any command returning 2 rather than 1 value in the current version. It is easily fixed with code below:

current: if isempty(ranges) || ~isnumeric(ranges) || size(ranges, 2) ~= 2 || size(ranges, 1) < 1 || any(ranges(:) < 0) || any(rem(ranges, 1) ~= 0)

fix: if isempty(ranges) || ~isnumeric(ranges) || size(ranges, 2) ~= 2 || size(ranges, 1) < 1 || any(ranges(:) < 0) || any(rem(ranges, 1) ~= 0,'all')

tagging @MaxvandenBoom

MaxvandenBoom commented 2 years ago

You're right, that was a very recent addition. I applied your solution, checked it and it works! Thank you!