필터 지우기
필터 지우기

Is there a way or function to hide certain lines of code in Matlab 2015a keeping the result normal?

조회 수: 70 (최근 30일)
I wanted to hide certain parts of my code. Is there any way I can do that without having an impact on the final result?
  댓글 수: 3
Adam
Adam 2019년 4월 3일
If you mean just for the purposes of clarity and easy readability then move the code into functions. If you mean for security that you don't want a reader to be able to see the code at all then you would have to convert to P-code or put it in a dll or some other type of solution like that.

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam Danz
Adam Danz 2019년 4월 3일
편집: Adam Danz 2019년 4월 11일
Matlab documentation suggests two methods of protect source code: using a p-file and building a standalone executable. The first option is usually the better of the two.
A p-file obfuscates the code (it is not encrypted). Though the content of the p-file is difficult to understand, it is not completely secure.
Move the content you'd like to protect into a new m-file. Then use pcode() to convert that to a p-file.
More examples provided in the documentation here:

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by