Is it possible for MATLAB Compiler for generate applications that use P-code?
16 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 6 月 27 日
編集済み: David Leffingwell
2023 年 6 月 12 日
I would like to compile a P-file or a MATLAB file that calls a P-function.
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
This enhancement has been incorporated in Release 2009a (R2009a). For previous product releases, read below for any possible workarounds:
The ability to deploy P-code is available as of MATLAB Compiler 4.0 (R14). However, a P-code function cannot be compiled directly but must be wrapped by a MATLAB file. For example, if you create a function:
function ptest
disp('Hello from P-code');
and then use PCODE to generate ptest.p, you will not be able to successfully compile PTEST. However, you can compile code that calls this P-code, as in:
function pwrap
ptest
Note that compiling P-code will not enable the source code to be revealed since MATLAB Compiler 4.0 does not generate a C translation of the code.
If you are using a previous version of MATLAB Compiler, read the following:
The MATLAB Compiler can translate MATLAB code into C, C++, or P-code. The MATLAB Compiler does not compile P-code or MATLAB code that calls P-code functions.
There are no workarounds for compiling P-code. P-code can be used to hide algorithms and translating it is therefore not an option. For more detail on the differences between MATLAB code and P-code, see the Related Solution listed below.
0 件のコメント
その他の回答 (1 件)
David Leffingwell
2023 年 6 月 12 日
編集済み: David Leffingwell
2023 年 6 月 12 日
The MATLAB Compiler can automatically create P-code for you.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!