Actually I am just adding a fix for this submitted by a user (thanks Knut) , so it should work with modern versions soon.
Best, Martin
On 04/06/2016 11:02 AM, Martin Reuter wrote:
Hi Angela,
newer versions of matlab don't support the old matlabpool comands any longer. You need to use an older matlab version (less than 8.2.0.29).
Best, Martin
On 04/05/2016 06:06 PM, Angela Favaro wrote:
Hi Martin, thank you for your help. I still have problems in running mixed models analyses. Do I need some additional toolbox in matlab? (I did not find this information in the web) I tried to run the module in two versions of matlab, but the same problem occurr.
I used these commands: [M,Y,ni] = sortData(M,1,Y,sID) X = [ones(length(M),1) M M(:,1).*M(:,2)]
[lhTh0,lhRe] = lme_mass_fit_EMinit(X,[1 2],Y,ni,lhcortex,3)
this is the error message: Undefined function 'matlabpool' for input arguments of type 'char'.
Error in lme_mass_fit_init (line 74) if (prs==1) || (matlabpool('size') ~= prs)
Error in lme_mass_fit_EMinit (line 69) [Theta1,Re1] = lme_mass_fit_init(X,Zcols,Y,ni,[],prs);
What can it be the problem? the matrices seem to be OK (and M has the same number of rows as Y (and as the sID)).
thank you for any help!
Angela
Martin Reuter mreuter@nmr.mgh.harvard.edu ha scritto:
Hi Angela,
the smooth function seems to be part of the curve fitting toolbox http://www.mathworks.com/help/curvefit/smooth.html so either that is missing, or your version is too old. You can skip the lowess Plot (it is just for initially checking the data).
Make sure your M has the same number of rows as your Y (and as the sID). Also make sure you are computing the ni (and sorted M and Y) like this (if your first column in M is the time, else specify the column with the time as the second parameter):
[M,Y,ni] = sortData(M,1,Y,sID); # (sorts the data)
Best, Martin
On 03/20/2016 04:38 PM, Angela Favaro wrote:
Dear Freesurfer experts, I need some help with the longitudinal streaming and the use of mixed models in matlab. I followed all the instructions and tried to use the following commands in matlab:
lme_timePlot(M(:,1),Y,ni) and this worked well
However, when I tried this: lme_lowessPlot(M(:,1),Y,0.70,M(:,2))
matlab gave the following error message:
Undefined function 'smooth' for input arguments of type 'double'. Error in lme_lowessPlot (line 49) ybw = smooth(st,dat(ix),bw,'rlowess')
I checked in my version of matlab (R2012b) and the command 'smooth' does not exist
Further, when I tried this:
lhstats = lme_fit_FS(X,[1 2],Y,ni)
Error using - Matrix dimensions must agree.
Error in lme_fit_init (line 42) ri = yi-Xi*Bhat;
Error in lme_fit_FS (line 71) [D,phisq] = lme_fit_init(X,Zcols,y,ni);
Looking into the matlab code, I observed that in line 42 there is no command..... and I am sure that matrix dimensions are correct.
So, I have problems in solving these issues... Any help is greatly appreciated! Is it a problem of Matlab version? Thank you!
Angela
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Martin Reuter, PhD Assistant Professor of Radiology, Harvard Medical School Assistant Professor of Neurology, Harvard Medical School A.A.Martinos Center for Biomedical Imaging Massachusetts General Hospital Research Affiliate, CSAIL, MIT Phone: +1-617-724-5652 Web : http://reuter.mit.edu
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer