Back to the main page.

Bug 3331 - functions names in @cell from cellfunction folder cause issues with MATLAB tables

Reported 2017-08-14 13:27:00 +0200
Modified 2017-11-20 20:06:23 +0100
Product: FieldTrip
Component: external
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Miguel Navarrete - 2017-08-14 13:27:44 +0200

functions names in @cell which shadow built-in functions in external/cellfunction folder block the cell management of MATLAB tables (e.g. set(tableHandle,'Data',someCellData)). Specifically, in the MATLAB arrayviewfunc function in line 1777 (i.e. isreal, which is overloaded by external/cellfunction/@cell) fieldtrip version MATLAB version (R2017a)

Jan-Mathijs Schoffelen - 2017-08-14 21:23:31 +0200

Can you please be a bit more informative please? In order for us to take this seriously, you should at least specify the specs of the machine you are running matlab on, including the matlab version. Also, a small snippet of code that allows us to reproduce is a minimal requirement. Until today I have never heard of a MATLAB 'table' datatype, nor of the arrayviewfunc. Also, it is not clear to me why you have external/cellfunction on the matlab path to begin with.

Miguel Navarrete - 2017-08-15 12:14:27 +0200

Created attachment 846 error message for set/get uitable when ft/external/cellfunction in the path

Miguel Navarrete - 2017-08-15 12:15:51 +0200

(In reply to Jan-Mathijs Schoffelen from comment #1) Hi, As stated in the bug description, MATLAB version is (R2017a) and fieldtrip version fieldtrip-20170813; furthermore, the machine is a 64B windows PC + 16G RAM. I didn't stated that table were a datatype, but maybe I wasn't clear of which type of table I was referring to because there are two: table objects (class 'table' introduced in R2013b) and uitables (class 'matlab.ui.control.Table' introduced before R2006a). The arrayviewfunc is a low level function used by matlab 'set' and 'get' functions and located in $matlabroot\toolbox\matlab\codetools; I am not using it directly. The fieldtrip\external\cellfunction is automatically included in the path when I set it for fieldtrip and subfolders. The solution for now has been removing this folder for the matlab path, but I don't know which functions require access to this folder that may fail in a future use, so I think this is not the best solution; as any serious software development group I would imagine that the idea is improving filedtrip compatibility for any user, even for the ones that don't use fieldtrip as their primary toolbox isn't it?. Additionally, to be taken seriously, I send and attachment of a dumb code displaying the error, and where is pointed out

Jan-Mathijs Schoffelen - 2017-08-15 14:24:43 +0200

[jansch@mentat004 fieldtrip]$ cd commit external/cellfunction/@cell/isreal.m bash: cd: commit: No such file or directory [jansch@mentat004 fieldtrip]$ git commit external/cellfunction/@cell/isreal.m [master 680222b] ENH - output single boolean, rather than one boolean value per cell 1 file changed, 1 insertion(+), 1 deletion(-) [jansch@mentat004 fieldtrip]$ git push upstream master Counting objects: 11, done. Delta compression using up to 6 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 606 bytes | 0 bytes/s, done. Total 6 (delta 4), reused 0 (delta 0) remote: Resolving deltas: 100% (4/4), completed with 4 local objects. To 1f2a713..680222b master -> master