필터 지우기
필터 지우기

matlab cannot save my figure

조회 수: 41 (최근 30일)
LE FOU
LE FOU 2011년 8월 23일
댓글: Walter Roberson 2020년 1월 18일
Dear all,
I am having a problem with Matlab and I don't know how to solve it, I tried to search for the error and I couldn't find any solution, can you help me please ?
I am getting the following message when I try to save a huge image 5003 x 49597, using Pcolor, and it is not saving my image.
matlab warning: Variable 'hgS_070000' cannot be saved to a MAT-file whose version is older than 7.3. To save this variable, use the -v7.3 switch. Skipping... > In hgsave at 268 In general\private\saveasfig at 7 In saveas at 126 In loading_whole_summer2009 at 24 (this is the function name I have created)
I am using a desktop with a 16GB of RAM and 1TB of hard disk, and I am running only Matlab. Is there a way to optimize the memory or can you explain to me what does it mean the 'use the -v7.3 switch.'
thanking you in advance,

채택된 답변

Oliver Woodford
Oliver Woodford 2011년 8월 23일
Instead of saveas, use:
hgsave(1, ['C:\users\lefou\desktop\back/' jd '/' Outputname '.fig'], '-v7.3');
From the documentation on hgsave:
hgsave(...,'-v7.3') saves the FIG-file in a format that can be loaded only by MATLAB versions 7.3 and above. This format, based on HDF5 files, is intended for saving FIG-files larger than 2 GB.
  댓글 수: 3
sri satya ravi
sri satya ravi 2020년 1월 18일
@Oliver Woodford
i am trying to save a figure in matlab.
i gave this command.
hgsave(1, ['N:\DL_Diag\hmld\DSM-DI Team\Arun\SCRCE_Mustang\back/' jd '/' NHA_Linx_3539 '.fig'], '-v7.3');
i am getting an error saying Undefined function or variable 'jd'.
Can you please help me on how to save this figure as a matlab figure?
Walter Roberson
Walter Roberson 2020년 1월 18일
hgsave(1, 'N:\DL_Diag\hmld\DSM-DI Team\Arun\SCRCE_Mustang\back\NHA_Linx_3539.fig', '-v7.3');

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

추가 답변 (3개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 23일
type 'help save' or 'doc save' for options of save() command. '-v7.3' is to allow support for data items greater than or equal to 2GB.
  댓글 수: 1
LE FOU
LE FOU 2011년 8월 23일
hello,
thanks for your quick answer is there a solution to this problem ?

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


LE FOU
LE FOU 2011년 8월 23일
Hello
you meant to use save -v7.3 myfile v1 v2. I am trying to apply this, but my problem is that I am using the following code :
saveas (1,['C:\users\lefou\desktop\back/' jd '/' Outputname '.fig']);
I tried the following but it didn't work is there a way I can do it ? : save -v7.3 (1,['C:\users\lefou\desktop\back/' jd '/' Outputname '.fig']);
thanks again,
  댓글 수: 1
Fangjun Jiang
Fangjun Jiang 2011년 8월 23일
No. It looks like you want to save the image to a .fig file. It shouldn't cause memory problem. You could clear all the variable before saveas(). Are you sure you have the right file name? You could also try print() command.

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


LE FOU
LE FOU 2011년 8월 23일
Hello Fanguin and Oliver,
thanks for your support, I was waiting to get my results before answering you.
@ Fanguin, yes I am sure that I have the right file name
@Oliver : I followed your advice and it worked but I used this after changing the hgsave into myhgsave.m
myhgsave(1, ['C:\users\lefou\desktop\back/' jd '/' Outputname '.fig']);
thanks for both of you,
  댓글 수: 1
LE FOU
LE FOU 2011년 8월 23일
by the way it turned out that my image is around 1.6 GB

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

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by