How to prevent code being edited

조회 수: 9 (최근 30일)
Daelyn Greene
Daelyn Greene 2019년 1월 26일
댓글: Daelyn Greene 2019년 1월 26일
I am writing code for a user who knows nothing about MatLab and only needs to run the code, not go in and edit it. Is there a way to lock down the code so that they cannot accidentally change something?

답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 26일
No, there is not.
Your operating system might provide read-only settings for files, or might provide the possibility of setting the ownership to someone else so that they cannot write to the file even by overwriting read-only.
You could also consider using pcode, as then the only source they would be able to see would be the help files you provide. This is not secure "intellectual property protection" against a determined person, but it slows down accidents.
  댓글 수: 3
Walter Roberson
Walter Roberson 2019년 1월 26일
Yes. it is designed for execution .
MATLAB parses m code into internal data structures and then actually execution is based on the data structure in memory . pcode is like saving a copy of the internal data structure and being able to load it. It is not source code so you cannot easily read it, but it is not designed for high security so it should not be used when security is important .
Daelyn Greene
Daelyn Greene 2019년 1월 26일
It’s for a school project. Pcode sounds like it’d work fine. Thanks for the help!

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

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by