필터 지우기
필터 지우기

Error using save can't write file

조회 수: 51 (최근 30일)
Patrik Ek
Patrik Ek 2014년 3월 5일
댓글: raym 2022년 12월 2일
Hi,
I have got this really strange error in matlab. When I try to run the command
save(fullfile('filepath','filename'),'var','-v7');
I get the error message,
error using save can't write file
but when I try
save(fullfile('filepath','filename'),'var','-v7.3');
everything works fine. The the variable takes some space on the workspace, 165MB, but the I would guess that the size should not be an issue here. Does anyone know why it does not work to save in "v7"?
For the one that want to confirm the size of the variable, I will add the "whos" information,
Name Size Bytes Class Attributes
myName 1x1 173081921 struct
BR/ Patrik
EDIT
The variable I try to save is a struct with plenty of fields. I have also tried to save a 3 dimensional matrix of size 800 mb which is larger, but goes through easily.
  댓글 수: 1
Patrik Ek
Patrik Ek 2014년 3월 5일
Does this have something with that the header becomes to large or something? Or is this a bug that should be reported to mathworks?

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

채택된 답변

Iain
Iain 2014년 3월 5일
Some versions of the save function really don't react well to structures.
  댓글 수: 2
Patrik Ek
Patrik Ek 2014년 3월 5일
편집: Patrik Ek 2014년 3월 5일
Ok so your guess that version 7 is one of them?
raym
raym 2022년 12월 2일
I also encounter the same issue in R2016a.
I save a structure of unicode strings. when structure is small it saves Ok but when is large it failed.
Change to v7.3 also solves the problem.
I guess that vertain unicode in the strings cause the error.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by