change "nrun = X" to "nrun = 1". It works as running in batch editor.
So for the example of normalize.m and normalize_job.m, normalize_job.m has all the information and normalize.m is to run normalize_job.m (but could be as simple as one command).
May be helpful for others also with confusion, there's no need to code for normal analyses steps in spm8. Scripts could be Like this:
1. Do all the steps for one subject with batch editor.
2. Put all steps in batch editor, and save via "save batch and script", which give two m files, say, "all_steps.m" and "all_steps_job.m".
(Again, all_steps_job.m keeps all the actual information, and all_steps.m is just like a "complicated" command to run all_steps_job.m.)
3. In all_steps.m, change "nrun = X" to "nrun = 1".
(In matlab type all_steps.m will run all_steps_job.m)
4. Change subject information in the two m file and save as scripts for other subjects.
(e.g., change subject's name, data directory, and save as, say subject2_all_steps.m and subject2_all_steps_job.m.)
(in matlab type subject2_all_steps.m will run the analysis for subject 2)
(A tip. To keep things simple. Do some changes on the file names of original data, and arrange directory well. !! If the only difference between different subjects is the name (or subject number), just changing subjects' names in the scripts to get scripts for other subjects)
Cheers.
Xiang
|