MATLAB Answers

Saving/loading large images fast

5 views (last 30 days)
Mateus Banroc
Mateus Banroc on 19 Dec 2019
Commented: Mateus Banroc on 19 Dec 2019
Hi everyone,
I'm working with large images (between 50MB and 100MB). When I save the figure obj using save in .mat format, MATLAB returns a warning "saving handle figures in .mat can create very large files. Try use savefig". So I tryed to use savefig and the .fig file was larger than the .mat file. Is there a method to save/load these figures in a faster way?

  0 Comments

Sign in to comment.

Accepted Answer

Rik
Rik on 19 Dec 2019
I think it would be faster to load the data and recreate the figure. In general savefig only makes sense if you have a large number of objects with non-default parameters.
Also, it is only a warning. Warnings should make you think hard about your approach. If then the conclusion is that you are using the best approach, you can either ignore the warning, or suppress it.

  1 Comment

Mateus Banroc
Mateus Banroc on 19 Dec 2019
Actually, I'm building an app and the figure has some uicontrol buttons and non-default parameters, so I think I need to save this parameters some how, maybe in a function that can set these parameters. In this case I could load the data and recreate the figure. Thanks Rik.

Sign in to comment.

More Answers (0)

Sign in to answer this question.