The title says it all. I'm using 2019a and trying to visualize some statistical models. I often use plotSlice for that (https://www.mathworks.com/help/stats/linearmodel.plotslice.html). It doesn't appear to have changed over the years, and after uninstalling/reinstalling the stats toolbox I'm still getting the "undefined function" error when I try to use it.

 채택된 답변

Steven Lord
Steven Lord 2022년 9월 1일

0 개 추천

How are you calling plotSlice? According to the documentation page plotSlice requires its input to be a "Linear regression model object, specified as a LinearModel object created by using fitlm or stepwiselm, or a CompactLinearModel object created by using compact." [That first link above links to the most recent documentation, but this hasn't changed since release R2019a.] If you tried calling this with something like a normal double precision array you'd receive an error:
plotSlice(magic(4))
Unrecognized function or variable 'plotSlice'.

댓글 수: 1

mackeca
mackeca 2022년 9월 1일
Hi Steven, thanks for your answer. You found the issue. I was using a linear mixed effects model object as the input, which I forgot isn't possible. It works with a linear model object, just not mixed effects models. Thanks again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

릴리스

R2019a

질문:

2022년 9월 1일

댓글:

2022년 9월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by