Greetings,
There are couple of new matlab functions in AFNI's matlab directory that allow you to launch and control AFNI from matlab. To check them out, download AFNI's latest source code, which contains the matlab library, and run from matlab the sample script Test_TellAfni .
To run the demo script, you need the datasets distributed with AFNI's matlab library:
[
afni.nimh.nih.gov]
The heart of the new functions is a c program called plugout_drive that is also distributed with AFNI. Check it out too.
cheers,
-ziad