Protect a Simulink model but keep the possibility to modify it

Hello,
I am new on Simulink and want to protect a model in order to add a password for Read/Write action. In this way, I can send to my client the model but without the password it won't be able to modify it.
The way to protect a model like this include a kind of compilation which permits only the read action. Maybe I am wrong?
Thank you in advance if you can advice me.
Best regards.

 Accepted Answer

8 Comments

Is it another licence than Simulink Coder ?
Ok so I have this licence. You confirm me if I use the function protect, I will create a slxp file protected for example with password but my client will be able to modify the model if I send him this password ?
Yes, you can see in the documentation that you can choose what kind of protection you want, for simulation, or for code generation.
Ok perfect thank you very much. Moreover, do you know how to read an entire csv/xls file in simulink using a block, in ordre to use the table output in a matlab function after (not as a signal so because block such as "from ..." give only signal) ? Best regards.
That is not possible. Functions to read spreadsheet files such as readtable are not supported by Simulink, only by MATLAB. It also does not work to put such commands inside a MATLAB Function block and put it in Simulink that way. It will throw an error. The readtable MATLAB function is not listed in the list of supported MATLAB functions for usage within Simulink.
You can read MAT-files directly into Simulink using the From File block. You could use a script to load the spreadsheet file and convert it into a MAT file or load it as a variable prior to running the Simulink model.
Ok you save my day. The load function of matlab doesn't need the coder.extrinsic function so the load function is compatible for the model protection (whereas all function needed coder.extrinsic are not, such as xlsread or readtable). Thank you very much.
The load function, even if doesn't requrie the coder.extrinsic code line, is not supported also ... I tried with readtable but same thing. Do you know what matlab function can be used to read a table/csv/mat file and is compatible with the simulink coder ? Best regards.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2016b

Community Treasure Hunt

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

Start Hunting!