Print

Print


Dear SPM Experts,

I am still trying to figure out this piece of code. Unfortunately I am afraid I've hit a wall. Any assistance would be greatly appreciated. Thanks in advance.
'Sincerely,
- Ananth

On Tue, Nov 11, 2014 at 5:12 PM, Ananth Narayanan <[log in to unmask]> wrote:
Thank you, Guillaume Flandin and Taylor Salo. Both your codes work. However, I am unclear on why my code doesn't work the way I think it should, no matter how I change it. To that effect, I have a few questions.

In the codes that you sent me, you both have the following statement:
spm_jobman('run', matlabbatch);

However, I have the following command:
spm_jobman('serial', jobs, '', inputs{:});

This command was generated when I selected the contrast manager and clicked File > Save Batch and Script from the Batch Editor. This generated 2 files, a *.mat and a *_job.mat. What is the difference between these two calls of the same function? I read the help file on spm_jobman, but that didn't fully answer my question.

Which brings me to the next question:
The scripts you sent has some elements of matlabbatch incorporated into its code. Are there any advantages to doing it this way or is it just a personal preference? What exactly is matlabbatch and when should I invoke it?

Thank you.
'Sincerely,
- Ananth

On Fri, Nov 7, 2014 at 1:55 PM, Taylor Salo <[log in to unmask]> wrote:
My first impression is that you're running a bunch of separate one-subject one-sample t-tests with your code, though I could be wrong. Regardless, I think the changes I made to the script will solve the problem. Please let me know if they don't.