Hello All, I was currently using 2012b Matlab and built executables for the same. While I shifted to 2016b Matlab (due to the requirement of tools to run in Windows 10) I find that the executable sizes are quite large. 2012 — 540kB 2016 — 1.05MB
My question( as mentioned in comment 2) was is there any possibility of reducing the size of executable or does it matter on any other conditions due to which size cannot be reduced. Thank you in advance.

댓글 수: 6

Rik
Rik 2017년 12월 12일
And what is your question? You might also notice that R2016b is substantially faster with some functions. In some cases I've seen my code run 5 times faster.
Akshata M
Akshata M 2017년 12월 12일
I would like to know why is this happening? and also if I can do something to reduce the size of exe. I also find its comparatively not fast in running exe.
Thank you in advance.
Rik
Rik 2017년 12월 12일
It may be a doubling, but is a 500 kb increase really such a problem for you? I don't think there is a solution other that going back to R2012b, but someone might chip in to confirm or correct me.
Jan
Jan 2017년 12월 12일
1.05 MB does not sound large. The modern Matlab versions have more features, such that you can expect the size to grow.
But maybe you mean the creation of code for a micro controller. Than MBs still matter. So please explain the details.
Akshata M
Akshata M 2017년 12월 12일
편집: Akshata M 2017년 12월 12일
The problem is I will have such 20+ executables that must be built. Even if there were one executable it would have been a concern due to double of size. 20+ executables creates lot of difference. I used deploytool to build the executable.
Jan
Jan 2017년 12월 12일
Sorry, Akshata M, the problem is still not clear: 20 files a 1 MB have 20 MB, instead of 10 MB when you use R2012b. Of course there might be any circumstances, where the additional 10MB matter, but this is not likely or clear. Please take the time to mention any details. Currently it is not even clear, what your question is.

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

답변 (1개)

Jan
Jan 2017년 12월 12일
편집: Jan 2017년 12월 13일

0 개 추천

I try to post an answer, although I'm not sure what the question is exactly:
As you have seen already, R2016b creates larger executable as R2012b. This can depend on the used compiler, so try MinGW, MSVC 2017 (plus patch) or WinSDK 7.1 (see Supported Compilers R2016b). Maybe the executables have different sizes, but you might need to provide the distributables also. But maybe the larger files are not caused by the compiler, but by Matlab itself. Then there is no option to decrease the file size magically. Either stay at R2012b or live with the larger files in R2016b.
[EDITED]
You can reduce the file size by including the required toolboxes only and exclude the redistributables. But the size of 1.05MB is such small, that I assume, that this is the necessary minimum already.
Try to create a minimal running example, e.g. only the creation of one figure, and compile it. Do you see an equivalent grow up of the executable from R2012 to R2016? Maybe it is a certain part of the code, which causes the growing and could be written in another way.

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2017년 12월 12일

편집:

Jan
2017년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by