This function will allow you to switch between different SPM versions. WARNING! As SPM depends on various global (and sometimes, local workspace) variables, this function clears all variables as part of the switch.
The function will need to be put in a directory in your Matlab path that does not contain SPM. spmsel.m