Back to the main page.

Bug 271 - the use of matlabversion fails for 2010a and b because they are represented as 7.10 and 7.11

Reported 2010-12-08 11:16:00 +0100
Modified 2011-01-12 09:29:50 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Eelke Spaak
Depends on:
See also:

Robert Oostenveld - 2010-12-08 11:16:02 +0100

e.g. peercellfun has if matlabversion>=7.8 % do something end the something has to be done for all higher versions. The same greater-than check is also used elsewhere (a.o. fieldtripdefs probably). Do a grep for matlabversion and fix it everywhere!

Robert Oostenveld - 2010-12-08 11:20:10 +0100

suggested implementation add the comparison to the matlabversion function as matlabversion(min, max) e.g. matlabversion(-inf, '2007b') matlabversion('2010a', inf) matlabversion(7.8, 7.8) % only version 7.8 it should support both string and numeric inputs