How can I distribute an application that is developed using MATLAB?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
I would like to distribute the MATLAB code that I have developed. What are some ways to package and distribute this code as an application to users who do not have MATLAB?
採用された回答
Section 1: Overview of Deployment Options
MATLAB® deployment products convert MATLAB programs into applications and components that you can distribute to end users who do not have MATLAB installed. Deployed applications run as MATLAB code against a set of supporting MATLAB libraries called the MATLAB Component Runtime (MCR). The deployment products generate wrapper code to allow your MATLAB application to run as a stand-alone executable or interact with other technologies, but your application remains in MATLAB code. Thus, the execution time of deployed code will be almost identical to the execution time in MATLAB.
You can deploy MATLAB applications as:
Stand-alone executables using MATLAB Compiler™
C or C++ libraries using MATLAB Compiler™
Java classes using MATLAB Builder™ JA
Microsoft .NET or COM components using MATLAB Builder™ NE
Microsoft Excel add-ins using MATLAB Builder™ EX
All deployed components and applications can be distributed free of charge. The deployment products support the MATLAB language, most MATLAB toolboxes, and user-developed GUIs.
Section 2: How Does the MATLAB® Compiler™ Work
You can create deployable applications and components either by using the command line MCC command or by using the Deployment Tool Graphical User Interface.
An application or component generated by MATLAB Compiler™ has two parts: a platform-specific binary file and an archive file containing MATLAB functions and data. For an application, the binary file consists of a main function, and for a library the binary file exports multiple functions that can be called by users of the library. The wrapper file provides an interface to the compiled MATLAB code. Wrapper files differ depending on the execution environment. The archive file, called a Component Technology File. which is named with a .ctf suffix, contains the MATLAB functions and data that define the application or library.
Any application or component created from the same version of MATLAB can then run against the same MCR – it is not necessary to distribute a new MCR with each update of your application or component.
Section 3: Deployment Tool Workflow
Open the Deployment Tool by issuing the following command at the MATLAB prompt:
deploytool
Use the Deployment Tool as follows to create and package either a standalone application or a shared library:
(a) Create a new project.
(b) Add files that you want to compile.
(c) Set properties for building and packaging.
(d) Save the project.
(e) Build the component.
(f) Test, edit and rebuild as necessary.
(g) Package the component for distribution to programmers or end users.
For more information on the mcc command, consult the MATLAB documentation.
Section 4: Deploying with the Compiler
You need three main components when distributing your application:
(a) The component wrapper or application wrapper you have created (for example, .exe or .dll)
(b) The archive file containing all of the MATLAB code used in your component or application – this is called the CTF (Component Technology File) and has the extension .ctf
(c) The MCR
You may use the package option in the Deployment Tool to package the wrapper, archive, and, optionally, the MCR into a single zip file for distribution.
Section 5: What If All Else Fails?
If you have tried all of the above steps and are still having trouble distributing your application, use this form to contact technical support. Be sure to include the following:
(a) The version of MATLAB you are using
(b) The system path of the target machine
(c) The name of the directory where the run-time libraries are installed
(d) The exact error message
4 件のコメント
Hi,
Can I package a file on PC to run on OSX?
Thanks.
Hi Royi,
If you want your apps to run on OS X, you will have to compile them using MATLAB running on OS X. Apps created on Windows will not run onn OS X.
No, applications must be created on the operating system class they are to run on. The exception to this is that you can use a 64 bit version of MS Windows to create a .exe to run on a 32 bit version of MS Windows.
No, the java that is created uses JNI to call platform-specific libraries.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with MATLAB Compiler についてさらに検索
タグ
タグが未入力です。
参考
2012 年 2 月 22 日
2016 年 12 月 29 日
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
