[Marsbar-users] error with maroi
Status: Beta
Brought to you by:
matthewbrett
|
From: <tob...@me...> - 2007-07-09 12:32:42
|
Dear marsbar users,
I tried to run a script in order to extract beta values and received the
following error message:
---------------------------------------
??? Undefined function or method 'maroi' for input arguments of type 'char'.
Error in ==> beta_script at 23
roi_array{1} = maroi(Kug_ROI_1);
----------------------------------------------
Can anybody give me a clue how to fix this?
Below you find the whole script.
Thanks in advance.
Regards, Tobias
-----------------------------------------
clear all;
cwd = 'F:\marsbar_ROIs';
cd (cwd);
dir{1} = 'F:\"subject folder"\SPM.mat';
roi_dir = ' F:\marsbar_ROIs';
Kug_ROI_1 = fullfile(roi_dir, 'hippo1_roi.mat');
roi_name{1}= 'hippo1';
roi_array{1} = maroi('load', Kug_ROI_1);
for vp = 1:length(dir)
spm_name = dir{vp};
for i = 1:length(roi_array)
roi = roi_array{i};
D = mardo(spm_name);
Y = get_marsy(roi, D, 'mean');
E = estimate(D,Y);
xCon = get_contrasts(D);
E=set_contrasts(E, xCon);
b = betas(E);
marsS = compute_contrasts(E, 1:length(xCon));
cont = marsS.con;
Tval = marsS.stat;
pval = marsS.P;
pcorr = marsS.Pc;
f = length(Tval);
Roinr = zeros(1,f)'+i;
connr=zeros(1,f)';
for k = 1:length(connr)
connr(k,1)=k;
end
fid = fopen(['VP',num2str(vp),'_Roi_',roi_name{i},'_ges_spss.txt'],'w');
for j=1:length(Tval),
fprintf(fid,'%3f %3f %3f %6.3f %6.3f %6.3f %6.3f\n', ...
vp, Roinr(j), connr(j), cont(j), Tval(j), pval(j), pcorr(j));
end
fclose(fid);
end
end
----------------------------------------------
Tobias Melcher
Systems Neuroscience Unit
Department of Psychiatry and Psychotherapy
Georg-August-University Goettingen
von-Siebold-Str. 5
37075 Goettingen
Germany
|