Matlab doesn't seem to recognize SPM 2 files - "spm_list_files.dll is not a valid win32 application"

Hello All,
I am using Matlab R2009b and SPM2 on a Win7 32-bit platform. I have previously tried running the same combination on Macbook pro using Parallels and Bootcamp. In all cases the error message is identical:
>> tsbatch_tmsextract(gp,sp) ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2009b\toolbox\spm\spm2\spm_list_files.dll': C:\Program Files\MATLAB\R2009b\toolbox\spm\spm2\spm_list_files.dll is not a valid Win32 application.
.
Error in ==> spm_list_files_expand at 42 [Files,Dirs] = spm_list_files(WDir,Filter);
Error in ==> spm_get at 1754 [P,null] = spm_list_files_expand(dir,fil,ListOpts);
Error in ==> tsbatch_tmsextract at 53 trials = spm_get('files',trial_dir,[gp.raw_filt '*' gp.art_ext]);
I have no programing experience, so if you think you have a solution to my problem, please try to use the simplest form of your explanation as possible.
Thanks in advance, Michael

Antworten (3)

Did you get the 64-bit version or the 32-bit version? Sounds like you might be trying to use the 64-bit on 32-bit and that's not going to work.
I used the 32bit Matlab installation.
I have actually installed the 64-bit version initially, and I received the same error back then as well.

3 Kommentare

googling for "spm2 not valid win32 application" finds the following:
In my experience, if it's not the 64/32 bit thing, something is corrupt in the download itself -- this error is coming straight from the OS and not from MATLAB.
I actually found this post a while ago - but dismissed it because it metnioned the update is for a 2007 version of Matlab.
Do you think it will work with a different version of Matlab? Namely, R2009b?
Thanks!
From reading that page, and also the download page of SPM2, it seems there is a newer version called SPM8 that likely is more supported, as follows:
"SPM8 is designed to work from MATLAB versions 7.1 (R14SP3) to 8.0 (R2012b)"
SPM2 says it works with "MATLAB 6.0 - MATLAB 6.5", which pre-date the R<year>[a|b} releases, and map to R12 - R13. R2009b 's version is "7.9"
Ken's suggestion is also worth looking into if you must work with SPM2. But if I was in your shoes, I'd likely give the newer version a try if it will also meet your requirements.

Melden Sie sich an, um zu kommentieren.

Ken Atwell
Ken Atwell am 19 Sep. 2012
Bearbeitet: Ken Atwell am 19 Sep. 2012
Jason might be on to something with a corrupted download. However, I have also seen this message when a MEX file is present (and valid), but a dependent DLL is missing. To see if this is the case:
  1. Download the Dependency Walker tool from <http://www.dependencywalker.com>
  2. Open the MEX-file with Dependency Walker. If it shows any red in its table, you likely have a dependency problem that you will need to address before MATLAB can have a hope of loading the file.
If SPM includes source code, you can consider rebuilding the MEX-File from source. If you go down this route, you would need to install not a modern compiler, but one that was supported in 2009. Refer to <http://www.mathworks.com/support/compilers/R2009b/>

1 Kommentar

Hi Ken,
Thank you for taking the time. This might sound dumb to you, but remember I'm new to this - the commands that I'm running are m files. How would I know which one is the relevant MEX file?
Thanks, Michael

Melden Sie sich an, um zu kommentieren.

Tags

Gefragt:

am 18 Sep. 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by