Attempt to execute SCRIPT ' ' as a function error
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I am running custom code that has worked fine for a couple of years and I'm suddenly running into the following error:
Attempt to execute SCRIPT graphics/private/adjustGridLineStyles as a function
The function above is a Matlab function, and I have nothing that shares its name.
Prior to this, I had an identical error with two other Matlab functions including the following:
Attempt to execute SCRIPT internal.stats.strCollapse as a function
So I don't think it's my code. I am on a new computer but I have it set up like the old one and I've reset paths to default. Any ideas would be helpful.
Thank you.
3 comentarios
Matt J
el 14 de Feb. de 2024
I would do a clean reinstall (i.e., completely deleting all pre-existing Maltab installation folders).
Respuestas (1)
Walter Roberson
el 14 de Feb. de 2024
This problem is caused by a corruption of the MATLAB installation, one that causes it to lose track of the internal implementation of functions. The search for the function instead finds the .m file that exists only for documentation purposes. Because the documentation .m has only comments, it is technically a script file.
There is a possibility that the system might fix itself if you do
restoredefaultpath; rehash toolboxcache
but it is common that when this sort of corruption occurs that you need to reinstall MATLAB.
0 comentarios
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!