error when trying to run fit function

I keep getting the error:
Attempt to execute SCRIPT mpower as a function:
/Applications/MATLAB_R2020b.app/toolbox/matlab/ops/mpower.m
while trying to run my fit function. Any idea how to fix this?

Respuestas (1)

Torsten
Torsten el 7 de Abr. de 2023

0 votos

Seems you gave your script the name "mpower.m".
This conflicts with the built-in MATLAB function with the same name.
Rename your script.

2 comentarios

Precisely not, this is why it's driving me crazy, the file name is fitting.m
Please post the results of executing this command from your Command Window or a script:
which mpower -all
/MATLAB/toolbox/matlab/matfun/mpower.m /MATLAB/toolbox/fixedpoint/fixedpoint/+embedded/@fi/mpower.m % embedded.fi method /MATLAB/toolbox/control/ctrlmodels/@InputOutputModel/mpower.m % InputOutputModel method /MATLAB/toolbox/parallel/gpu/@gpuArray/mpower.m % gpuArray method /MATLAB/toolbox/parallel/parallel/@codistributed/mpower.m % codistributed method /MATLAB/toolbox/wavelet/wavelet/@laurpoly/mpower.m % laurpoly method
Your result should be similar to this. If there are any other entries, that points to the problem.
.

Iniciar sesión para comentar.

Categorías

Productos

Versión

R2020b

Etiquetas

Comentada:

el 7 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by