A small correction, the correct spm function should be: spm_invFcdf not spm_Fcdf On Wed, May 30, 2012 at 11:27 PM, MCLAREN, Donald <[log in to unmask]>wrote: > This bug is related to not having the statistics toolbox for MATLAB. We > are working on removing these dependencies. > > In the interim, there are two options: > (1) Find icdf.m on the internet (google has a few links); > (2) on line 407 replace > > UF = icdf('F',1-.001,df1,df2); > with > UF=spm_Fcdf(1-.001,df1,df2); > > (3) on line 349-354 replace > > if isfield(I,'Thresh') && ~isempty(I.Thresh) > thresh = icdf('F',I.Thresh,df1,size(xx,1)-df1-1); > else > thresh = icdf('F',.5,df1,size(xx,1)-df1-1); > %disp(thresh); > end > > with > > if isfield(I,'Thresh') && ~isempty(I.Thresh) > thresh = spm_Fcdf(I.Thresh,df1,size(xx,1)-df1-1); > else > thresh = spm_Fcdf(.5,df1,size(xx,1)-df1-1); > %disp(thresh); > end > > Let me know if you have more issues. > > Best Regards, Donald McLaren > ================= > D.G. McLaren, Ph.D. > Postdoctoral Research Fellow, GRECC, Bedford VA > Research Fellow, Department of Neurology, Massachusetts General Hospital > and > Harvard Medical School > Website: http://www.martinos.org/~mclaren > Office: (773) 406-2464 > ===================== > This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED > HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is > intended only for the use of the individual or entity named above. If the > reader of the e-mail is not the intended recipient or the employee or > agent > responsible for delivering it to the intended recipient, you are hereby > notified that you are in possession of confidential and privileged > information. Any unauthorized use, disclosure, copying or the taking of > any > action in reliance on the contents of this information is strictly > prohibited and may be unlawful. If you have received this e-mail > unintentionally, please immediately notify the sender via telephone at > (773) > 406-2464 or email. > > > > > On Wed, May 30, 2012 at 4:22 AM, zeynep basgoze <[log in to unmask]>wrote: > >> Hi everyone, >> >> When I try to run GLM Flex I face with this error: >> >> Processing Set #48??? Undefined function or method 'icdf' for input >> arguments of type 'char'. >> >> Error in ==> GLM_Flex at 407 >> UF = icdf('F',1-.001,df1,df2); >> >> Error in ==> GrupAnalizDeneme at 25 >> I = GLM_Flex(I); >> >> I tried almost everything to solve this problem, including renaming >> the files, rewriting codes, reloading & adding paths etc. However I >> could not find the solution. Now I doubt that the code I wrote for my >> experiment could be incorrect, that's why I'm sending it to you...If >> anyone can help me with that I'd be very appreciated. Thank you so >> much in advance... >> >> Best wishes, >> >> Zeynep Basgoze >> >> >> My design is a 2x2x2 mixed ANOVA with 2 within factors: congruency >> (congruent/incongruent) & valence(positive/negative) with two levels >> each) and 1 between factor with levels:control&depression >> >> the GLM Flex code: >> >> clear IN; clear F; clear I; >> IN.N_subs = [6 6]; >> IN.Between = [1 2]; % The 1 here is so we can run a one sample t-test >> across all the data >> IN.BetweenLabs = {{'All'} {'Depression', 'Control'}}; >> IN.Within = [2 2]; >> IN.WithinLabs = {{'Cong' 'Incong'} {'Pos' 'Neg'}}; >> IN.FactorLabs = {'All' 'Group' 'Congruency' 'Valence'}; >> IN.Interactions = {[2 3] [2 4] [3 4] [2 3 4]}; >> IN.EqualVar = [1 0 0 0]; >> IN.Independent = [1 1 0 0]; >> >> F = CreateDesign(IN); >> >> figure(1); imagesc(F.XX); shg >> >> I.OutputDir = pwd; >> I.F = F; >> I.Scans = {'Hasta_Emine_con9.nii' 'Hasta_Emine_con10.nii' >> 'Hasta_Emine_con11.nii' 'Hasta_Emine_con12.nii' 'Hasta_MAT_con9.nii' >> 'Hasta_MAT_con10.nii' 'Hasta_MAT_con11.nii' 'Hasta_MAT_con12.nii' >> 'Hasta_Nuran_con9.nii' 'Hasta_Nuran_con10.nii' 'Hasta_Nuran_con11.nii' >> 'Hasta_Nuran_con12.nii' 'Hasta_Sanem_con9.nii' 'Hasta_Sanem_con10.nii' >> 'Hasta_Sanem_con11.nii' 'Hasta_Sanem_con12.nii' 'Hasta_Sati_con9.nii' >> 'Hasta_Sati_con10.nii' 'Hasta_Sati_con11.nii' 'Hasta_Sati_con12.nii' >> 'Hasta_Yunus_con9.nii' 'Hasta_Yunus_con10.nii' 'Hasta_Yunus_con11.nii' >> 'Hasta_Yunus_con12.nii' 'Kontrol_Ali_con9.nii' 'Kontrol_Ali_con10.nii' >> 'Kontrol_Ali_con11.nii' 'Kontrol_Ali_con12.nii' >> 'Kontrol_Dilek_con9.nii' 'Kontrol_Dilek_con10.nii' >> 'Kontrol_Dilek_con11.nii' 'Kontrol_Dilek_con12.nii' >> 'Kontrol_Emre_con9.nii' 'Kontrol_Emre_con10.nii' >> 'Kontrol_Emre_con11.nii' 'Kontrol_Emre_con12.nii' >> 'Kontrol_Nazli_con9.nii' 'Kontrol_Nazli_con10.nii' >> 'Kontrol_Nazli_con11.nii' 'Kontrol_Nazli_con12.nii' >> 'Kontrol_Selgin_con9.nii' 'Kontrol_Selgin_con10.nii' >> 'Kontrol_Selgin_con11.nii' 'Kontrol_Selgin_con12.nii' >> 'Kontrol_Sibel_con9.nii' 'Kontrol_Sibel_con10.nii' >> 'Kontrol_Sibel_con11.nii' 'Kontrol_Sibel_con12.nii'}; >> I.RemoveOutliers = 0; >> I.minN = 2; >> I.DoOnlyAll = 1; >> I.CompOpt=0; >> >> >> I = GLM_Flex(I); >> >> %% >> I.Cons(1).name = 'All'; >> I.Cons(1).Groups = {1}; >> I.Cons(1).Levs = 1; >> I.Cons(1).ET = []; >> I.Cons(1).mean = 0; >> >> I.Cons(2).name = 'Group Effect'; >> I.Cons(2).Groups = {2 3}; >> I.Cons(2).Levs = 2; >> I.Cons(2).ET = []; >> I.Cons(2).mean = 0; >> >> I.Cons(3).name = 'Congruency Effect'; >> I.Cons(3).Groups = {4 5}; >> I.Cons(3).Levs = 2; >> I.Cons(3).ET = []; >> I.Cons(3).mean = 0; >> >> I.Cons(4).name = 'Valence Effect'; >> I.Cons(4). Groups = {6 7}; >> I.Cons(4).Levs = 2; >> I.Cons(4).ET = []; >> I.Cons(4).mean = 0; >> >> I.Cons(5).name = 'Group by Congruency'; >> I.Cons(5). Groups = {8 9 10 11}; >> I.Cons(5).Levs = [2 2]; >> I.Cons(5).ET = []; >> I.Cons(5).mean = 0; >> >> I.Cons(6).name = 'Group by valence'; >> I.Cons(6). Groups = {12 13 14 15}; >> I.Cons(6).Levs = [2 2]; >> I.Cons(6).ET = []; >> I.Cons(6).mean = 0; >> >> I.Cons(7).name = 'Congruency by Valence'; >> I.Cons(7). Groups = {16 17 18 19}; >> I.Cons(7).Levs = [2 2]; >> I.Cons(7).ET = []; >> I.Cons(7).mean = 0; >> >> I.Cons(8).name = 'Group by Congruency by Valence'; >> I.Cons(8). Groups = {20 21 22 23 24 25 26 27}; >> I.Cons(8).Levs = [2 2 2]; >> I.Cons(8).ET = []; >> I.Cons(8).mean = 0; >> >> >> I = GLM_Flex_Contrasts(I); >> > >