MATLAB: Undefined function ‘times’ for input arguments of type ‘cell’

matrix

I'm performing the lme model with longitudinal data analyzed using free surfer, I have created this matrix:
X = [ones(length(M),1) M M(:,1).*M(:,2)];
but I have the following error
Undefined function 'times' for input arguments of type 'cell'.
What is it wrong? enrica

Best Answer

When you want to access the contents of "M", you need to access it like this:
M{:,1}
Related Question