<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Hi,</div><div> I've been plagued by some odd behavior in Matlab, also reported by other users of my EP Toolkit (which requires installation of FieldTrip). I've been able to isolate the cause as being the cellfun.m "upgrade" that is located in the compat/R13 and compat/R14 folders of the FieldTrip distribution. When FieldTrip's version of cellfun.m is included in the path, a number of strange things happens (in this particular case, using Matlab 2008a on an Intel Mac under OS 10.6.2 but also seen in other configurations to at least some degree):</div><div><br></div><div>1) The following command stops working and produces the following error:</div><div><br></div><div>[fileNames, pathname] = uigetfile</div><div><br></div><div><div>??? Cell contents reference from a non-cell array object.</div><div><br></div><div>Error in ==> cellfun at 21</div><div> argin{j} = varargin{j}{i};</div><div><br></div><div>Error in ==> iscellstr at 13</div><div> res = cellfun('isclass',s,'char');</div><div><br></div><div>Error in ==> cell.ismember at 27</div><div>if ~((ischar(a) || iscellstr(a)) && (ischar(s) || iscellstr(s)))</div><div><br></div><div>Error in ==> AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.set.InitialFileName at 71</div><div> if any(ismember({'.', '..'}, iFile))</div><div><br></div><div>Error in ==> AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.initialize at 259</div><div> obj.InitialFileName = '';</div><div><br></div><div>Error in ==> UiFileOpenDialog.UiFileOpenDialog>UiFileOpenDialog.initialize at 121</div><div> initialize@AbstractFileDialog(obj);</div><div><br></div><div>Error in ==> AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.AbstractFileDialog at 26</div><div> initialize(obj);</div><div><br></div><div>Error in ==> UiFileOpenDialog.UiFileOpenDialog>UiFileOpenDialog.UiFileOpenDialog at 9</div><div> function obj = UiFileOpenDialog(varargin)</div><div><br></div><div>Error in ==> uigetputfile_helper at 40</div><div> ufd = UiFileOpenDialog();</div><div><br></div><div>Error in ==> uigetfile at 125</div><div> [filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});</div><div><br></div><div>2) The path listings becomes erratic. Things happen like the FieldTrip paths disappear from the list, Matlab claims that a function is not on the path when you try to add a breakpoint to it even though it is indeed still on the path and being recognized by the "which" function etc. etc.</div><div><br></div><div>So first of all, I'd like to warn users of FieldTrip who are experiencing symptoms like this to make sure to drop the offending FieldTrip function from their path. Unfortunately, I expect that some of the FieldTrip functions are depending on the presence of this "upgraded" cellfun.m function and will not work properly so I'm not sure what the effect of doing so is.</div><div><br></div><div>Second of all, I'd like to suggest to the developers that we should try to avoid replacing built-in Matlab functions as it can have unexpected effects on the rest of the system. As I recall, we had to drop the Biosig Toolbox from the FieldTrip distribution for much the same reason.</div><div><br></div><div>Finally, I would be most obliged if the relevant FieldTrip developers could implement a fix for this problem.</div><div><br></div><div>Thanks!</div><div><br></div><div>Joe</div><div><br></div></div></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>--------------------------------------------------------------------------------<br> <br>Joseph Dien,<br>Senior Research Scientist<br>University of Maryland <br> <br>E-mail: <a href="mailto:jdien@umd.edu">jdien@umd.edu</a><br>Phone: 301-226-8848<br>Fax: 301-226-8811<br><a href="http://homepage.mac.com/jdien07/">http://homepage.mac.com/jdien07/</a></div></div></div></div></span></div></span></span>
</div>
<br></body></html><p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p> http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p> http://www.ru.nl/fcdonders/fieldtrip/</p>