John, Benjamin, and SPMers: Thanks again for your help. John, apologies for being so opaque about the origins of this script. John wrote and posted a version of reslice.m on the listerv, last dated Jan 14 2004 see (http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind04&L=SPM&P=R9647&I=-3) with a link to (http://www.sph.umich.edu/~nichols/JG/reslice.m) where the code actually is located. At Ben's suggestion I removed the end; at line 25 column 31 after V0 = spm_create_image(V0); which fixes one of the error messages. But after rerunning the script in SPM2, a new error message appears and one persists. ??? Error using ==> run Input argument "PI" is undefined. Error in ==> spm at 1276 evalin('base',CBs{v-1}) Suggestions? Rob McClure Robert K. McClure M.D. Assistant Professor Department of Psychiatry UNC School of Medicine Room 247, Medical School Wing C Chapel Hill, NC, 27510-7160, USA E-mail: [log in to unmask] Office phone: 919-843-6629 Fax: 919-966-8004 Pager: 919-216-2058 ----- Original Message ----- From: John Ashburner <[log in to unmask]> Date: Wednesday, September 21, 2005 6:05 am Subject: Re: [SPM] reslice.m > The file reslice.m isn't an official part of SPM2, so I can't > really say any > more. Who wrote it? Was it me, and if so do you remember when? > I've > probably written loads of functions called reslice.m, so I > wouldn't remember > this particular one. If it is a small function, then the > following link may > help: http://www.mathworks.co > > Best regards, > -John > > On Tuesday 20 September 2005 23:14, Robert McClure wrote: > > Dear John and SPMers: > > > > I ran into a snafu while using the m-file "reslice.m" in SPM2 (see > > attachment from the 2004 listserv). The MATLAB error message reads: > > > > ??? Error using ==> run > > Error: File: c:\spm2\scripts\reslice.m Line: 25 Column: 31 > > This statement is not inside any function. > > (It follows the END that terminates the definition of the function > > "reslice".) > > > > Error in ==> spm at 1276 > > evalin('base',CBs{v-1}) > > > > ??? Error while evaluating uicontrol Callback. > > > > Is there a problem with the code ? > > > > thanks in advance, > > > > Rob McClure > > > > Robert K. McClure M.D. > > Assistant Professor > > Department of Psychiatry > > UNC School of Medicine > > Room 247, Medical School Wing C > > Chapel Hill, NC, 27510-7160, USA > > E-mail: [log in to unmask] > > Office phone: 919-843-6629 > > Fax: 919-966-8004 > > Pager: 919-216-2058 > >