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.

 Respuesta aceptada

Steven Lord
Steven Lord el 1 de Sept. de 2022

0 votos

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 comentario

mackeca
mackeca el 1 de Sept. de 2022
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.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2019a

Preguntada:

el 1 de Sept. de 2022

Comentada:

el 1 de Sept. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by