How to Increase MATLAB Running Speed ?

3 ビュー (過去 30 日間)
Selva Karna
Selva Karna 2018 年 6 月 21 日
回答済み: Denis Gurchenkov 2018 年 7 月 25 日
How to Increase MATLAB Running Speed ? i Run a Code in MATLAB Editor its take 2seconds, but its convert to JAR Deploy , i get in result after 48seconds , how can reduce time delay ? can share any Idea's?

回答 (1 件)

Denis Gurchenkov
Denis Gurchenkov 2018 年 7 月 25 日
Most likely you used MATLAB Compiler to create a deployment executable, and so when that executable is run, first thing it does is starting MATLAB engine (46 seconds in your case, likely) and then running your code (2 seconds). When you ran your code in the editor directly, MATLAB is already started, so it only took 2 seconds.
As you added "MATLAB Coder" to the list of products for this question, you can try using MATLAB Coder (codegen) to generate a native executable for your OS, and deploy that executable. It won't require MATLAB at all so it will likely run in 2 seconds or less. The getting started guides are here: https://www.mathworks.com/campaigns/products/offer/download_matlab-coder.html
A more heavyweight solution is to set up a MATLAB production server, so that MATLAB is always loaded up in memory, and thus incoming work requests (such as "run this code") would take no more time than running directly in the editor.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB Compiler SDK についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by