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