Error when using hold on
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Stephen23
am 9 Jun. 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!
Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!