Back to the main page.
Bug 1174 - fileparts() : 4th argument and Matlab R2011b
Status | CLOSED INVALID |
Reported | 2011-11-21 22:14:00 +0100 |
Modified | 2012-08-23 14:02:07 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | All |
Operating System: | All |
Importance: | P3 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Dimitri Papadopoulos - 2011-11-21 22:14:21 +0100
Created attachment 191 patch to remove 4th output argument to fileparts() in ft_qualitycheck.m Starting with Matlab R2010a, the fourth output argument of fileparts() is no longer supported and has been removed. Calling the function with more than three output arguments has been generating a warning since that version R2010a: http://www.mathworks.fr/help/techdoc/rn/br_bpq8-1.html#bsdnyvb-1 http://www.mathworks.fr/help/techdoc/ref/fileparts.html Although this is not clearly documented and starting with Matlab R2011b, calling the function with more than three output arguments does error. I've found a single occurrences of fileparts() being called with 4 arguments in ft_qualitycheck.m: [pathstr,name,extr,versn] = fileparts(exportname); Can you please fix it? Removing the spurious 4th argument should be enough since neither the 3rd not the 4th argument are used. There are actually a few other occurrences in subdirectories external/spm2 and external/spm8 but : - SPM8 will be fixed soon: the FIL maintainer is aware of the problem, has fixed it and a patch should be released before next January, - SPM2 is not maintained by the FIL anymore but I am in the process of fixing it here: http://sourceforge.net/projects/spm2/
Boris Reuderink - 2011-11-28 15:19:01 +0100
Other instances can be found with: $ find . -name "*.m" | xargs egrep "\[([^,]*,){2,}[^,]*].*=.*fileparts" Files in SVN revision 4870 that use FILEPARTS with four return arguments are: ./external/spm2/spm_normalise.m ./external/spm2/spm_segment.m ./external/spm2/spm_write_sn.m ./external/spm8/@nifti/private/read_hdr.m ./external/spm8/@nifti/privateread_hdr.m ./external/spm8/spm_normalise.m ./external/spm8/spm_fileparts.m ./external/spm8/spm_vol.m ./external/spm8/spm_smooth.m ./external/spm8/spm_orthviews.m ./external/spm8/spm_write_sn.m ./ft_qualitycheck.m So it appears that we only have to fix ft_qualitycheck.
Jörn M. Horschig - 2012-01-06 15:51:06 +0100
someone fixed this already