How to prevent code being edited
32 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
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
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 .
参考
カテゴリ
Help Center および File Exchange で Robotics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!