How do i use and -s flag for compiling a MATLAB app
조회 수: 5 (최근 30일)
이전 댓글 표시
I want to compile a Matlab app, and I'd like to keep some of the functions written for the code unreadable.
I read that I can use a "-s" flag to obfuscate the code, but didn't manage to use it properly. How can I do it?
댓글 수: 0
답변 (3개)
Navya Singam
2021년 11월 8일
Hi,
For obfuscating the code, you can use the "pcode" function in MATLAB. It converts the .m file to P-file, which is content-obscured and execute-only form of MATLAB code.
Syntax for creating P-file
pcode(item) %% creates a item.p P-file for the item.m file
댓글 수: 0
Walter Roberson
2021년 11월 8일
You can add the -s option to the mcc command line.
If you are using applicationCompiler then click on the Settings button, and in the section that comes up marked "Additional parameters passed to mcc:" type in
-s
댓글 수: 2
David Leffingwell
2023년 6월 12일
Use the "-j" switch to the MATLAB Compiler to automatically convert all M files to P-code (in R2022b or later)
The "-s" option of the MATLAB Compiler doesn't obfuscate the M code, it obfuscates the file and folder structure inside the package and also supports encryption of data files.
David Leffingwell
2023년 6월 12일
Use the "-j" switch of the MATLAB Compiler to automatically convert all M files to P-code (in R2022b or later)
댓글 수: 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!