Azzera filtri
Azzera filtri

MATLAB Permission

15 visualizzazioni (ultimi 30 giorni)
Jared
Jared il 10 Gen 2012
Risposto: karim botros il 2 Ott 2023
Hi,
I am receiving an error while trying to save a file. I have entered:
A=[34,45;17,6]
save A1.dat A -ascii
I am receiving
??? Error using ==> save
Unable to write file A1.dat: permission denied.
I just installed MATLAB and do not know how to grant myself permission to write the files.

Risposte (4)

Andreas Goser
Andreas Goser il 10 Gen 2012
There is no need to enable saving or so. This will be just related to the directory / folder you attempt writing to. Mostly, this is when you have a directory within yout MATLAB installation. Try a different directory. If difficulties persist, let us know the OS, the MATLAB release and the directory name.
  4 Commenti
Andreas Goser
Andreas Goser il 12 Gen 2012
"directory name" is with relation to the operating system. In MATLAB, you get the "current directory", e.g. by using the PWD command, or you see it at the top of the IDE. If yoo copy that string into the Windows Explorer, then you can check permissions. If it is below the MATLAB installation path, you should chosse a different directory for saving data.
Tushant Verma
Tushant Verma il 21 Ott 2021
Thanks Andreas ,this worked for me

Accedi per commentare.


Sven Schoeberichts
Sven Schoeberichts il 12 Gen 2012
Sounds like you're using a school's computer, and appearently you lack the permission to write to the MATLAB directory.
Try saving to a USB memory stick, or the My Documents folder.

Getinet Amare
Getinet Amare il 20 Dic 2017
Modificato: Walter Roberson il 20 Dic 2017
use this command with file name getinet.mat
save(fullfile(tempdir, 'getinet.mat'))
and to load a file with file name getinet.mat
load(fullfile(tempdir, 'getinet.mat'))
have a nice coding with great day
  1 Commento
Walter Roberson
Walter Roberson il 20 Dic 2017
Be careful, though: if you are using a shared computer, then the systems administrator might delete the contents of the temporary directory at any time. Also, some operating systems delete the temporary directory files each time the system reboots.

Accedi per commentare.


karim botros
karim botros il 2 Ott 2023
In Windows,
1) you need to open matlab as administrator, if you are admin.
2) create the folder and check if the path fully exists.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by