Recompiling mex files on linux, I noticed: Compiling mex files... spm_add.c: In function `mexFunction': spm_add.c:107: warning: decimal constant is so large that it is unsigned Done. Line 107 looked like minval = -2147483648; and changing it to: minval = -2147483647; fixed the problem. Don't know if it's critical or not, just thougth I post this note, in case it is. Andrew.