MATLAB looks for a file “startup.m” in 1) your Documetns\MATLAB folder, or 2) in a folder like
C:\Program Files\MATLAB\R2019b\toolbox\local
(Where R2019b is the current release).
In CSPM, this file runs to make it easy to start SPM and CSPM.
If there is a problem:
Look for the startup.m file and rename it (“startup (problem).m” for example).
Start MATLAB; the current directory (folder) will be Documents\MATLAB
At the command prompt
>> cd c:\matlab\spm12
>> addpath c:\matlab\spm12
>> spm fmri
This starts SPM. The first command is not required.