Matlab mysterious new error with fitglm and fitlm

2 views (last 30 days)
Hello! What could be going on with this bug? Any help would be appreciated. I used to be able to run fitglm and fitlm in Matlab 2019, but now I get the following errror, including when I use the piece of code from the help documenthttps://www.mathworks.com/help/stats/fitglm.html:
Error using matlab.internal.datatypes.throwInstead (line 7)
The class table has no Constant property or Static method named 'fromScalarStruct'.
Error in struct2table (line 68)
matlab.internal.datatypes.throwInstead(ME,'MATLAB:table:UnequalFieldLengths',message('MATLAB:struct2table:UnequalFieldLengths'));
Error in dataset2table (line 13)
t = struct2table(s,'AsArray',false);
Error in classreg.regr.TermsRegression/handleDataArgs (line 525)
X = dataset2table(X);
Error in LinearModel.fit (line 1184)
[X,y,haveDataset,otherArgs] = LinearModel.handleDataArgs(X,varargin{:});
Error in fitlm (line 121)
model = LinearModel.fit(X,varargin{:});
Error in fitlm_try_debug (line 4)
lm = fitlm(d,'MPG ~ Year + Weight + Weight^2')
  21 Comments
Adam Danz
Adam Danz on 20 Dec 2020
...and varfun was introduced in r2013b. Didn't WR's suggestion to restore the path and toolbox cache fix that?
Andra Mihali
Andra Mihali on 20 Dec 2020
Edited: Andra Mihali on 20 Dec 2020
Indeed, WR's suggestion fixed it (my first answer was from before restoring the path and toolboxcache). Thank you all again, relieved now:)

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!