Error with fitrm – error using setdiffR2012a
Hi,
I am trying to apply the function fitrm (with MATLAB2015b) but it seems not to be working even with the documentation’s example. It gives me always the same error message and I have not found the way to solve this.
This is the code and the error:
load fisheriris
t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),…
‘VariableNames’,{‘species’,’meas1′,’meas2′,’meas3′,’meas4′});
Meas = table([1 2 3 4]’,’VariableNames’,{‘Measurements’});
rm = fitrm(t,’meas1-meas4~species’,’WithinDesign’,Meas)
Error using setdiff>setdiffR2012a (line 218)
Inputs A and B must be matrices with the same number of columns in the ‘rows’
case.
Error in setdiff (line 135)
[varargout{1:nlhs}] = setdiffR2012a(varargin{1:2},logical(flaginds(1:3)));
Error in classreg.regr.FormulaProcessor>createTerms (line 669)
addTerms = setdiff(addTerms,removeTerms,’rows’);
Error in classreg.regr.FormulaProcessor/processFormula (line 593)
f.terms = sortTerms(createTerms(f,t,s,lp,varNames));
Error in classreg.regr.FormulaProcessor (line 390)
f = processFormula(f,varNames);
Error in classreg.regr.MultivariateLinearFormula (line 46)
f = f@classreg.regr.FormulaProcessor(varargin{:});
Error in RepeatedMeasuresModel.fit (line 1297)
formula = classreg.regr.MultivariateLinearFormula(model,varNames);
Error in fitrm (line 67)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Is there anybody who encountered the same problem and knows how to solve it?Hi,
I am trying to apply the function fitrm (with MATLAB2015b) but it seems not to be working even with the documentation’s example. It gives me always the same error message and I have not found the way to solve this.
This is the code and the error:
load fisheriris
t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),…
‘VariableNames’,{‘species’,’meas1′,’meas2′,’meas3′,’meas4′});
Meas = table([1 2 3 4]’,’VariableNames’,{‘Measurements’});
rm = fitrm(t,’meas1-meas4~species’,’WithinDesign’,Meas)
Error using setdiff>setdiffR2012a (line 218)
Inputs A and B must be matrices with the same number of columns in the ‘rows’
case.
Error in setdiff (line 135)
[varargout{1:nlhs}] = setdiffR2012a(varargin{1:2},logical(flaginds(1:3)));
Error in classreg.regr.FormulaProcessor>createTerms (line 669)
addTerms = setdiff(addTerms,removeTerms,’rows’);
Error in classreg.regr.FormulaProcessor/processFormula (line 593)
f.terms = sortTerms(createTerms(f,t,s,lp,varNames));
Error in classreg.regr.FormulaProcessor (line 390)
f = processFormula(f,varNames);
Error in classreg.regr.MultivariateLinearFormula (line 46)
f = f@classreg.regr.FormulaProcessor(varargin{:});
Error in RepeatedMeasuresModel.fit (line 1297)
formula = classreg.regr.MultivariateLinearFormula(model,varNames);
Error in fitrm (line 67)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Is there anybody who encountered the same problem and knows how to solve it? Hi,
I am trying to apply the function fitrm (with MATLAB2015b) but it seems not to be working even with the documentation’s example. It gives me always the same error message and I have not found the way to solve this.
This is the code and the error:
load fisheriris
t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),…
‘VariableNames’,{‘species’,’meas1′,’meas2′,’meas3′,’meas4′});
Meas = table([1 2 3 4]’,’VariableNames’,{‘Measurements’});
rm = fitrm(t,’meas1-meas4~species’,’WithinDesign’,Meas)
Error using setdiff>setdiffR2012a (line 218)
Inputs A and B must be matrices with the same number of columns in the ‘rows’
case.
Error in setdiff (line 135)
[varargout{1:nlhs}] = setdiffR2012a(varargin{1:2},logical(flaginds(1:3)));
Error in classreg.regr.FormulaProcessor>createTerms (line 669)
addTerms = setdiff(addTerms,removeTerms,’rows’);
Error in classreg.regr.FormulaProcessor/processFormula (line 593)
f.terms = sortTerms(createTerms(f,t,s,lp,varNames));
Error in classreg.regr.FormulaProcessor (line 390)
f = processFormula(f,varNames);
Error in classreg.regr.MultivariateLinearFormula (line 46)
f = f@classreg.regr.FormulaProcessor(varargin{:});
Error in RepeatedMeasuresModel.fit (line 1297)
formula = classreg.regr.MultivariateLinearFormula(model,varNames);
Error in fitrm (line 67)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Is there anybody who encountered the same problem and knows how to solve it? fitrm, error, repeated measures MATLAB Answers — New Questions