Dear Daniel,
Thanks for the quick and helpful reply.
I'm still not quite there yet...It turns out I had to set SCENE_DATA(2) = 11, because it did not like the t-statistic option (i got the same two error messages as before:
DATASET error: function type missing auxilliary statistical data
DATASET error: illegal time-dependent dataset and func_type combination!)
(and of course i changed InfoDelOut.BRICK_STATAUX = [0 11 1 DF])
Now the dataset reads into AFNI ok, but the values are all wrong (autoRange goes to 32700). So now i suspect it's because i specified the data as short (InfoDelOut.BRICK_TYPES = [1]), however, my matrix matp is a double. WriteBrik does not yet support double, and I can't convert double to float or short in matlab (at least i cannot find out how to do this). Is this the problem?
One last thing: what does the degrees of freedom refer to in my case? My matrix is 64x64, which i want to be an overlay onto one slice. The functional data contains 259 timepts.
Thanks again,
cnan