Matlab export?


This page mentions a Matlab Library that Ziad and Gang once developed:

but the link is bad.

Can someone tell me where that library has gone, or else the best way to currently export voxel-wise beta coefficients as arrays in Matlab or some other general format?

Thanks very much.

Jim Waltz

It’s included in the source on github ( or on this site here. I’ll say that it hasn’t been updated in quite a while. You could also convert any AFNI dataset to NIFTI and then use functions in Matlab for importing those NIFTI files. Though the AFNI Matlab tools still worked the last time I tried them.

Thank you. I got it to work, but I was wondering if there is any documentation on the “BrikLoad” function.

BrikLoad asks for Opt, and the demo specfies Opt.Format = 'matrix’.

I wanted to know what the other format options were.

What I basically WANT is a one dimensional array with all elements. I can DO that by selecting the subbriks I want and reshaping the 3D arrays, but I was wondering if I could load the subbriks as 1D arrays.


Jim Waltz

I took a quick look at the BrikLoad.m source code, and it looks fairly well described there. I think setting Opt.format = vector will do what you want. As Peter said, we haven’t really done any updates to this in years. Reshaping in Matlab should also work. Another way is to use 3dmaskdump to dump the values into a text file and then read the text file into Matlab. That’s fairly slow though, and you will probably find the other choices more efficient.

Yes, that worked. Thank you so much.