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.

Reply via email to