Protect Matlab/Simulink Files

2 views (last 30 days)
Brett on 18 Apr 2022
I have a python GUI that I created which calls a matlab function, which runs a simulink model. I constructed it this way so that other users (who have all required licenses) can run the python GUI and get simulink results without having access to the matlab code. It makes it easy for users who don't know matlab to run it without being confused about the function inputs, etc. The matlab code is also proprietary, so I want to prevent users from being able to find and/or copy it.
Currently, I am storing the matlab and simulink files on a network drive that the user has access to, in a hidden folder. If I were them, I would probably be able to track down there files if I really wanted to. So it isn't ideal.
I can't compile the simulink model because I need to use variable time steps. It contains simscape blocks.
Can I password protect the matlab and simulink files? Prevent them from being copied? Can I store them on matlab online and run from there? Maybe only allow certain users to run it? Just wondering if anyone else has other solutions/suggestions.

Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 18 Apr 2022
One option is creating p-code of m-files, e.g.:
>> pcode MYfile.m


Community Treasure Hunt

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

Start Hunting!