MATLAB executable too slow
48 visualizzazioni (ultimi 30 giorni)
I converted my matlab program into Console based application using the deploytool in matlab. The matlab .m file takes around 2 seconds to execute but after I converted it into an executable form and called the .exe it takes 45 secs to execute which is too much. I want to integrate the matlab program with php. Is there any other efficient and fast way to do this? In my project, time is really a big factor(not the developing time but the execution time of the application) so any method that takes less time? I saw in the internet that we can write php extensions to call the matlab is this method fast or the same as calling the .exe file? Is matlab coder any help for this process? If there is any alternative options please mention it.
Walter Roberson il 12 Apr 2013
Start-up times for the executables will be slow, as it will go through the equivalent of starting up MATLAB itself.
This does not apply for MATLAB Coder, which generates C or C++ directly. However, there are quite a few things that are not supported in MATLAB Coder.
Peter il 13 Ago 2014
If you are using deploytool to compile your code, under Project - Settings-Toolboxes on path uncheck any toolboxes that aren't needed by your executable. I recently had this issue and the above steps cut the executable file size in half and significantly reduced the start time of the executable.