Print

Print


Try removing the qoutes around win_high. It's setting the value to a string
rather than reading in the values.

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Fri, Feb 7, 2014 at 10:05 AM, Benjamin Albrecht <
[log in to unmask]> wrote:

> Dear SPMlist,
>
> I want to add parameter to first-level conditions. Therefore I wrote a
> matlab-script to extract the values for these parameters from logfiles.
> These values are written to txt-files in ascii format in a cell array. Now
> I want to add these values to the first-level analysis. I tried it with
> saving a batch file as a .mat-file. Then I added the following file-name
> and variable name to the .mat-file but nothing happend. I think the problem
> is to get the right format for these values. But how could I read in these
> values for all the parameters? Because I have 20 subjects with three
> conditions and two parameters each and I want to make it a little bit
> faster with using these value-files.
> matlabbatch{1}.spm.stats.fmri_spec.sess.cond(1).pmod(1).name = 'win';
> win_high = textscan('\logfiles\VP01_parameter_wins_Block1_high.
> txt','%u',33,'Delimiter','\t')
> matlabbatch{1}.spm.stats.fmri_spec.sess.cond(1).pmod(1).param =
> ['win_high'];
> matlabbatch{1}.spm.stats.fmri_spec.sess.cond(1).pmod(1).poly = 1;
>
> Thank you for your help
>
> Benjamin Albrecht
>