Print

Print


Hello all,

I am scripting a set of processing procedures and wish to threshold a SPECT
scan based upon user input. Most of the script works fine, but I have found
an oddity between platforms/matlab versions. I was wondering if anyone else
has seen this or might be able to point me in the right direction for
resolving this.

An example of what I am trying to do is the following:

%c is a constant for thresholding (value comes from user input in script)
c=100; P=spm_get;
Q='test';
f='i1>c';
flags={};
Q=spm_imcalc_ui(P,Q,f,flags,c);

When run on a Sun (Solaris 8) using matlab 5.3.1.29215a (R11.1) this code
works correctly and produces the binary image of i1. When I run it on a
Windows XP machine using matlab 6.5.0.180913a R13 and an SGI Irix machine
running matlab 6.1 I get the following errors. All machines have all of the
spm2 updates.


>> Q=spm_imcalc_ui(P,'test','i1>c',{},c)

SPM2: spm_imcalc_ui (v2.7)                         07:34:30 - 09/12/2003
 =======================================================================
??? Error: "End of Input" expected, "=" found.

Error in ==> C:\spm2\spm_imcalc.m
On line 66  ==>   eval([inputname(i),' = varargin{i-4};'])

Error in ==> C:\spm2\spm_imcalc_ui.m
On line 157  ==> Vo   = spm_imcalc(Vi,Vo,f,args{:});


Any ideas on what is different between matlab 5.3 and the matlab 6 that
would cause this behavior?

Cheers,
Scott Ziolko
University of Pittsburgh PET Facility
[log in to unmask]