Error when using hold on

3 visualizzazioni (ultimi 30 giorni)
Dini Nurfiani
Dini Nurfiani il 9 Giu 2023
Commentato: Dini Nurfiani il 10 Giu 2023
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 Commenti
Stephen23
Stephen23 il 9 Giu 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!
Dini Nurfiani
Dini Nurfiani il 10 Giu 2023
Thank you. Noted.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by