Dear Yilong:
The following code segment asks for talairach coordinate and then
save the extracted data into a file named by you.
Please let me know if you find anything wrong.
Kewei
load SPM
load Yidx
xyz=input(' the [x y z] Talairach coordinate for the point: ');
outfile=input(' the file to save the extracted results: ','s');
XYZ=XYZ(:,Yidx);
XYZ=M(1:3,:)*[XYZ;ones(1,size(XYZ,2))];
ind=find(XYZ(1,:)==xyz(1) & XYZ(2,:)==xyz(2) & XYZ(3,:)==xyz(3));
eval(['diary ',outfile,'.xls']);
data=spm_extract('Y.mad',ind);
disp(data);
diary off
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kewei Chen, Ph.D.
Bio-mathematician
Samaritan PET Center
Visiting Research Associate Professor
ASU Math. Dept.
602-239-4851
[log in to unmask]
[log in to unmask]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|