Error when using hold on
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Due to some things, I previously used and followed this command (and knowing later that I should not have done that):
>> movefile('/Applications/MATLAB_R2017b.app/toolbox/matlab/graphics/hold.m', '/Applications/MATLAB_R2017b.app/toolbox/matlab/graphics/was_named_hold.m')
After this, I received "Previously accessible file "/Applications/MATLAB_R2017b.app/toolbox/matlab/graphics/hold.m" is now inaccessible."
Following a suggestion from the community, then I typed the command: "rehash toolboxcache". First try, it did not work (even after restarting MATLAB). I tried typing "which hold" and got this:
>> which hold
/Applications/MATLAB_R2017b.app/toolbox/matlab/graphics/hold.m
When I run my code to plot something, it gave me the error like this:
Error: File: hold.m Line: 1 Column: 25
The input character is not valid in MATLAB statements or expressions.
I then opened the file hold.m and I attached it along with this question. I appreciate if someone could help me guiding to solve this.
Thank you.
Dini
PS: I used MATLAB 2017b and also attached my script that uses hold on function.
2 comentarios
Stephen23
el 9 de Jun. de 2023
"knowing later that I should not have done that"
Just to make it clear for anyone reading this thread: do NOT move, modify, edit, etc. any of MATLAB's toolbox files.
Also: do not save your own Mfiles in the installation folders of any application!
Respuestas (0)
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!