I have a problem saving data

조회 수: 4 (최근 30일)
Jaime De La Mota Sanchis
Jaime De La Mota Sanchis 2021년 7월 4일
댓글: Jaime De La Mota Sanchis 2021년 7월 16일
Hello everyone. I have constructed a matlab code which requires the saving of various variables. For that, I have written
save('realizacionU12A')
And so on for the various variables which require saving.
However, I am running in the code and getting this error message
Error using save
Can not write file C:\Users\UX490U\Universidad Rey Juan Carlos\Ernesto Staffetti Giammaria -
phd_jaime\article_conflict_detection\experiment\codigoJaimeModificado\50nodosJan2020\realizacionU12B.mat.
Error in apc_and_reconstruction_28_janN2RVSmolyaklvl3 (line 624)
save('realizacionU12B')
Any ideas what can be wrong?
Best regards.
Jaime.
  댓글 수: 1
Mathieu NOE
Mathieu NOE 2021년 7월 4일
hello
the way you use the save function, it will save all your workspace; as explained by the help :
save(filename) saves all variables from the current workspace in a MATLAB® formatted binary file (MAT-file) called filename. If filename exists, save overwrites the file.
try maybe to save only the variables of interest and not the entire workspace

댓글을 달려면 로그인하십시오.

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 7월 4일
Or save in a different directory, e.g.:
save('C:\Users\..\realizacionU12A')
Change your current directory (cd ) and then save:
  댓글 수: 1
Jaime De La Mota Sanchis
Jaime De La Mota Sanchis 2021년 7월 16일
Tanks for the answer. In the end I could do it after ununstalling Matlab and installing it again.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Yongjian Feng
Yongjian Feng 2021년 7월 4일
Do you have write permission to that folder? If not, try cd to another folder and save there.
  댓글 수: 1
Jaime De La Mota Sanchis
Jaime De La Mota Sanchis 2021년 7월 16일
Tanks for the answer. In the end I could do it after ununstalling Matlab and installing it again.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by