Sorry, but now I can't get it working for multiple slices! I successfully converted the 64x64 matrix 'matp' into AFNI format, but that was a matrix pertaining to only one slice.
Now I would like to write out the matrices for each of my 13 slices. I have a variable 'allslice' which is 13x4096, and I also reshaped it into another variable 'matslice' = 64x64x13, since I don't know which one WriteBrik wants.
Can you please tell me how to set the attributes properly? I have tried:
InfoDelOut.DATASET_RANK(2) = 13 %13 slices
InfoDelOut.BRICK_FLOAT_FACS=[1 1 1 1 1 1 1 1 1 1 1 1 1]; %one for each slice
InfoDelOut.TAXIS_NUMS(1) = InfoDelOut.DATASET_RANK(2);
InfoDelOut.BRICK_TYPES = [3 3 3 3 3 3 3 3 3 3 3 3 3];
Although the WriteBrik function does not give any errors (if i use 'matslice'), the result is not displayed properly in AFNI.
I don't think 13 slices means 13 sub-bricks, does it?
If this doesn't work I can write out slice by slice and then concatenate them together...