I have been in correspondence with David about this issue (which I myself
ran into the very same day), and I think I found the problem.
Line 1423 of spm_jobman.m calls the function strfind() on a cell matrix of
strings, which in Matlab 7 is overloaded to allow the user to provide cell
matrices of strings as input. However, in Matlab 6.5, there is no
overloading (at least in the installations that David and I use) and
strfind() is expecting only ordinary strings as input, hence this error.
I think simply replacing "strfind" with "regexp" on this line (no changes to
inputs/outputs needed) will solve this backwards compatibility issue with no
untoward side effects that I can foresee. I've made this modification on my
own copy of SPM5 and it seems to work fine.
Perhaps if The Powers That Be deem this an adequate fix, it can be included
in the next batch of updates?
Cheers,
Matt
On Wed, 4 Jul 2007 11:00:55 +0100, David Field <[log in to unmask]> wrote:
>Hi
>
>I am getting a MATLAB error when I try to save a batch file.
>
>MATLAB reports an error with strfind (inputs must be character arrays). The
>error occurs on line 1423 of spm_jobman.m
>
>The puzzling thing is that I can usually create a batch file and save it
>several times but then at some stage this error occurs, and then it is never
>possible to save the file again. You can always open the file.
>
>I installed SPM5 a few days ago using the latest patches.
>
>Thanks
>
>Dr David Field
>
|