Getting Error while saving the File_name.m can anyone help why i am getting this?

while saving file after making changes in the code i am getting the following error shown in the image. Please guide me whats wrong with the simulator?

3 commentaires

Have you changed the working directory? Are you trying to save as or save?
No i haven't change the Directory you can see the path in the image. I am currently using bin folder to save .m files
" I am currently using bin folder to save .m files"
Do NOT store any of your own files in any .bin folder, or anywhere under Program Files or its 64 bit equivalents.
Change the directories you use to store any files to your user directory.

Connectez-vous pour commenter.

 Réponse acceptée

Jan
Jan le 5 Août 2018
Modifié(e) : Jan le 6 Août 2018
You need admin privileges to modify or save files inside Matlab's program directory. It is strongly recommended not to touch any files in this installation directory. Use your own folder instead to store your M-files, e.g. in the user's documents folder.

3 commentaires

Stephen23
Stephen23 le 5 Août 2018
Modifié(e) : Stephen23 le 5 Août 2018
In case this answer is not clear enough:
Do NOT save any files to the Program Files directories
Or for that matter to any other directory where programs are installed.
Your Current Directory should NOT be under the Program Files root.
Your Current Directory is usually be under the User root...
Well that's quiet confusing. How to change the path? the files run from the bin folder.
the files run from the bin folder
I thought Stephen was clear enough. You should never store your own m files in any directory under C:\Program Files\.
For several versions now, Windows has had built in protection to prevent you saving files there as it's very easy to render your installation unusable. This built-in protection is the cause of the error you're seeing.
Traditionally, your files are saved under MyDocuments\Matlab, in your user directory.
To return to your user directory:
cd(userpath)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by